The document discusses upgrading to Java 16 or 17. It covers why upgrades are important, the release cadence, and guidance for upgrading each Java version. The presenter provides an overview of common issues when upgrading like updating dependencies, and recommends preparing by upgrading build tools, running tests, and checking for breaking changes.
5. Background
» Software architect at Sanoma Learning
» Upgrading Java for years
» Applications with hundreds of thousands of users
a day
6. Why upgrade?
» Performance improvements
» Security fixes
» End of support, no more bugfixes
» …
» Use cool new features such as Records and
Pattern Matching
7. Why this session?
» Upgrading is seen as challenging
» Estimating the amount of work is difficult
» Projects stay on old Java versions
20. Detailed release info
» https://openjdk.java.net/
» https://openjdk.java.net/projects/jdk/17
⋄ Available from Java 10
» https://www.oracle.com/java/technologies/javase
/16-relnote-issues.html
⋄ Available from Java 10
27. Preparations
» IDE with support for Java 16 / 17
» Upgrade build tool and plugins
» Compiler plugin
» Unit test plugin (surefire)
» Integration test plugin (failsafe)
» …
29. Upgrade dependencies
» On current or new Java version
» Upgrade the dependencies you created as well
» mvn versions:display-dependency-updates
» Check for new artifact/group names
42. Maven Toolchains
» Runs partly on original Java
» Not all compile error info is shown
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-
compiler-plugin:3.8.1:compile (default-
compile) on project broken: Compilation
failure -> [Help 1]
43. Java 16: Lombok
… class lombok.javac.apt.LombokProcessor (in unnamed
module @0x21bd20ee) cannot access class
com.sun.tools.javac.processing.JavacProcessingEnvironment
(in module jdk.compiler) because module jdk.compiler does
not export com.sun.tools.javac.processing
to unnamed module …