Upgrade to Java 17#2212
Conversation
Raise the compiler target from 11 to 17 and bump the CI workflow JDKs to match. All 1192 tests pass under JDK 17 with none lost.
|
We have no plan to bump AHC from JDK 11 to 17 as this is a breaking change. |
|
Understood — thanks for the quick response and for clarifying the compatibility stance. Closing this out. Appreciate the work you do on AHC. |
|
Java 11 is fine. What feature do you need for Java 17? |
|
Hi @He-Pin — honestly, no specific feature; this was not feature-driven. It was a routine, tested "move to the next LTS" maintenance bump (all 1192 tests pass under 17), not because anything required Java 17. You are right that Java 11 is fine for AHC — given the broad consumer base, keeping the 11 baseline makes good sense, which is why I closed this. Thanks for the response and the work on AHC. |
|
To be honest, although some of our new applications are already running on Java 21 or Java 25, our internal libraries are still targeting Java 8, as there are still users on Java 8. I think you could switch to compiling with Java 17 while keeping the target set to Java 8. |
Upgrades the build from Java 11 to Java 17 (LTS).
pom.xml: compiler target 11 → 17 (consolidated to the<java.version>property +<release>${java.version}>).github/workflows/*(builds, maven, release):java-version11 → 17 so CI builds on the new targetVerification: the project compiles under JDK 17 and all 1192 tests pass, with none lost versus the JDK-11 baseline. No production or test code was changed — only the compiler target and the CI JDK.
How this was produced
This change was produced by running the OpenRewrite recipe below — the committed diff is the recipe output (no hand-editing):
mvn -U org.openrewrite.maven:rewrite-maven-plugin:RELEASE:run \ -Drewrite.configLocation=$(pwd)/rewrite.yml \ -Drewrite.activeRecipes=com.example.UpgradeJava \ -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASEVerified: all 1192 tests pass under JDK 17, none lost versus the baseline.