I’ve spent a bit of time trying out basic build (no QA) of our various projects with Java25 (just like we build with java 21).
I’ve found they are largerly working, besides a few exceptions, and the necessity to upgrade a some libraries.
Common issues across projects:
Spotless and palantir need to be ugpraded, they are both using Java API that is not available in Java 25. As a side effect of the palantir upgrade, the formatting changes a bit, comments right before a switch case are now aligned with the case.
Bytecode processing based libraries like mockito and easymock need to be upgraded to the latest (this brings in the latest bytebuddy)
Here are some project specific notes:
Imagen
The pull request fails some builds because the plugin upgrades needed for Java 25 compatibility makes them incompatible with Java 11. So first important finding: if we want to build also with Java 25, we have to wave goodbye to Java 11.
ImageIO-Ext
This is a simple project, does not yet uses spotless and has no testing mocks, it was just a matter of adding the build, and can still build with java 11 as a result.
GeoTools
Nothing special regarding the updates, but does not have a Java 11 build anymore, so all good.
GeoWebCache
Same as above, easy peasy lemon squeezy
GeoServer
This one has the same basics, but with a few twists
geofence-server has a test that won’t pass no matter what. The reason is simple, GeoFence uses a version of Hiberante that requires a specific bytebuddy, which is too old to work with the latest Mockito. I have added a conditional exclusion for the test.
For the life of me, there is no way to run “jmap” as an external process, as needed by the JVM console. jmap is being run on the GeoServer process PID, and jmap forces a full GC, which in JDK 25 apparently causes a deadlock between the two processes. No matter, I’ve replaced that code with an internal call to a MBean, which seems to return the same output and is arguably better (no dependency on an external tool, should work on a JRE too)
The gs-rest-openapi-java-client community module needed a lombok upgrade to compile
In short
Overall the update seems reasonably easy. Across the projects, we need to:
Rebase all projects to work on jdk 17+ (imageio-ext depends on imagen, so if we switch the latter to jdk 17)
Update Palantir (this means we’ll reformat also stable/maintenance branches to follow suite, for ease of backporting)