Skip to content

Upgrade to Java 17#2212

Closed
vasiliy-mikhailov wants to merge 1 commit into
AsyncHttpClient:mainfrom
vasiliy-mikhailov:bump-java-17
Closed

Upgrade to Java 17#2212
vasiliy-mikhailov wants to merge 1 commit into
AsyncHttpClient:mainfrom
vasiliy-mikhailov:bump-java-17

Conversation

@vasiliy-mikhailov

@vasiliy-mikhailov vasiliy-mikhailov commented Jun 24, 2026

Copy link
Copy Markdown

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-version 11 → 17 so CI builds on the new target

Verification: 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):

# rewrite.yml
type: specs.openrewrite.org/v1beta/recipe
name: com.example.UpgradeJava
recipeList:
  - org.openrewrite.java.migrate.UpgradePluginsForJava17
  - org.openrewrite.java.migrate.UpgradeBuildToJava17
  - org.openrewrite.java.migrate.UpgradeJavaVersion:
      version: 17
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:RELEASE

Verified: all 1192 tests pass under JDK 17, none lost versus the baseline.

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.
@hyperxpro

Copy link
Copy Markdown
Member

We have no plan to bump AHC from JDK 11 to 17 as this is a breaking change.

@hyperxpro hyperxpro closed this Jun 24, 2026
@vasiliy-mikhailov

Copy link
Copy Markdown
Author

Understood — thanks for the quick response and for clarifying the compatibility stance. Closing this out. Appreciate the work you do on AHC.

@He-Pin

He-Pin commented Jun 24, 2026

Copy link
Copy Markdown

Java 11 is fine. What feature do you need for Java 17?

@vasiliy-mikhailov

Copy link
Copy Markdown
Author

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.

@He-Pin

He-Pin commented Jun 24, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants