Clean Application Development with Records, Sealed Classes and Pattern Matching
summary
Shows Java 17/18 features with live code: demonstrates text blocks for multi-line strings, builds a Range record with canonical constructor and validation, and proves records stop deserialization from creating invalid instances — records prevent deserialization bypass. Refactors a CSV city pipeline by replacing String/Integer with State and Population records (small cost, clearer types), adds a custom collector, and uses pattern matching for switch plus sealed interfaces so the compiler enforces exhaustive cases.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 3:28Text blocks in Java 17
- 12:37Understanding Java records
- 25:37Serialization and security
- 30:43Improving code readability
- 50:31Pattern matching and sealed types
related talks
33mImprove your Java Applications with Records and Pattern Matching
54mData Focused programming with Pattern Matching in Java
37mRecord Patterns - Going Beyond Records - A Deep Dive
02h 41mCruising Along with Java: Benefiting from the Modern Features
32mGetting the Most from Modern Java
54mData Oriented Programming with the JDK 19
01h 02mThe Three Amigos: Intermixing Pattern Matching, Records, and Sealed Classes
31mData Oriented Programming and Matching in Java
