Skip to content

Upgrade to Java 21#1035

Open
vasiliy-mikhailov wants to merge 1 commit into
modelcontextprotocol:mainfrom
vasiliy-mikhailov:bump-java-21
Open

Upgrade to Java 21#1035
vasiliy-mikhailov wants to merge 1 commit into
modelcontextprotocol:mainfrom
vasiliy-mikhailov:bump-java-21

Conversation

@vasiliy-mikhailov

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

Copy link
Copy Markdown

Upgrades the build from Java 17 to Java 21 (LTS).

  • pom.xml and conformance-tests/client-spring-http-client/pom.xml: <java.version> (compiler target) 17 → 21

Verification: the project compiles under JDK 21 and all 1135 tests pass, with none lost versus the JDK-17 baseline. No production or test code changed — only the compiler target.

(Heads-up: raising the SDK baseline to 21 means consumers will need to build/run on JDK 21+. Happy to close this if you intend to keep a Java 17 baseline for broader compatibility — just offering it as a tested option.)


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.UpgradePluginsForJava21
  - org.openrewrite.java.migrate.UpgradeBuildToJava21
  - org.openrewrite.java.migrate.UpgradeJavaVersion:
      version: 21
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 1135 tests pass under JDK 21, none lost versus the baseline.

Raise the compiler target from 17 to 21. All 1135 tests pass under JDK 21 with none lost.
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.

1 participant