
< session />
Modern Java Patterns in Practice: Records, Pattern Matching, and Switch (with Real Refactors)
Modern Java has evolved into a powerful language for expressive, concise, and safe code, thanks to Records, Pattern Matching, and the new Switch patterns. But understanding why and how to apply these features effectively is what separates elegant refactors from confusing rewrites.
This session walks through real-world before/after examples that show how to simplify legacy code using these new constructs. You will see side-by-side diffs of refactors that replace verbose classes, long instanceof chains, and brittle type hierarchies with clean, declarative patterns. Each example highlights reasoning, trade-offs, and measurable impact from reduced bytecode complexity to easier testing and maintenance.
We will also cover version readiness (GA vs preview features from JDK 21 through 25), build and IDE setup, and pitfalls around mutability, serialization, and JSON mapping. Attendees will leave with a practical migration checklist and a strong grasp of when Records and Pattern Matching truly shine, and when they don’t.
What You Will Learn
-
How Records, Record Patterns, and Switch Pattern Matching simplify real codebases
-
Common pitfalls and anti-patterns to avoid
-
Performance and bytecode insights from actual benchmarks
-
Testing and maintenance techniques for pattern-based logic
-
A concise migration checklist for applying these features tomorrow
Who Should Attend
Experienced Java developers and architects who want to modernize existing codebases, reduce boilerplate, and confidently adopt new Java language features in production.
< speaker_info />
About the speaker
Manoj Palat
Open Source Lead & Committer, IBM
Manoj is an Open Source Lead and Committer at IBM, where he leads the development of the Java Compiler in Eclipse, focusing on integrating Java language changes into the compiler and related tools. His work extends to representing the Eclipse Foundation in the Expert Group for Java SE Platform JSRs and contributing to the Eclipse IDE Working Group Steering Committee.
Manoj holds a Master's degree in Computer Science from the Indian Institute of Science, Bangalore, and a B-Tech in Computer Science from the National Institute of Technology, Calicut.