Skip to content

Upgrade to Java 25#3000

Open
weiminyu wants to merge 1 commit intogoogle:masterfrom
weiminyu:java-25
Open

Upgrade to Java 25#3000
weiminyu wants to merge 1 commit intogoogle:masterfrom
weiminyu:java-25

Conversation

@weiminyu
Copy link
Copy Markdown
Collaborator

@weiminyu weiminyu commented Apr 1, 2026

Source/Target Compatibility Levels are kept to VERSION_21. Along with a minor change in VKeyProcessor, both Java 21 and 25 can build nomulus. This way the Java upgrade on Kokoro, which is not easy, is no longer a prerequsite for this PR.

Error-prone introduced many more checks in Java 25. We fixed a few and suppressed most. A follow-up bug is opened to clean this up. An ai agent should be able to clean up most of it.

This PR is created with gemini-cli. Summary of experience:

  • The good: AI caught most compatibility issues, and with permission, suppressed them through compiler flags and errorprone options. It also caught many version references in various shell and docker scripts.

  • Where it didn't shine:

    • It did not find and update the target version spec in the custome VKey annotation processor source file.
    • It did not flag eclipse-temurin:21 docker image for upgrade.
    • When running into failure, its first instinct is to disable checks e.g., -Werror instead of fixing them.

This change is Reviewable

@weiminyu weiminyu force-pushed the java-25 branch 2 times, most recently from 418ec59 to a15f54a Compare April 1, 2026 20:22
Error-prone introduced many more checks in Java 25. We fixed a few
and suppressed most. A follow-up bug is opened to clean this up.
An ai agent should be able to clean up most of it.

This PR is created with gemini-cli. Summary of experience:

* The good: AI caught most compatibility issues, and with permission,
  suppressed them through compiler flags and errorprone options.
  It also caught many versio references in scripts.

* Where it didn't shine:
  - It did not find and update the target version spec in the custome
    VKey annotation processor source file.
  - It did not flag eclipse-temurin:21 docker image for upgrade.
  - When running into failure, its first instinct is to disable checks
    e.g., -Werror instead of fixing them.
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