Repository navigation
Fix JmsIO finalize removal warning and clean up stale Java version logic - #40595
Merged
Merged
Conversation
- Replace `-source`/`-target` with `--release` as we no longer support Java8 (that did not recognize `--release`) - Enable ErrorProne and CheckerFramework in Java21 when fork compiler - Suppress `removal` in JmsIO
Contributor
Author
|
cc: @damccorm @stankiewicz turns out we still need this change to bring Nightly snapshot release back |
Contributor
There was a problem hiding this comment.
📋 Review Summary
This PR cleanly resolves the JDK 21 [removal] warning on Object.finalize() in JmsIO during cross-compilation by switching setCompileAndRuntimeJavaVersion from -source/-target to --release and suppressing removal on UnboundedJmsReader.finalize(). It also re-enables ErrorProne and Checker Framework when forking compilation to JDK 17/21.
🔍 General Feedback
- Switching
setCompileAndRuntimeJavaVersionto--releaseis a solid improvement now that Java 8 is no longer supported, ensuring forked compilers check against the target JDK's symbol definitions rather than the forked JDK's runtime classes. - Enabling ErrorProne (for Java 17 and 21) and Checker Framework (for Java 21) when compiling with a forked JDK aligns forked builds with standard presubmit checks while appropriately keeping them disabled for Java 25.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
Contributor
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
stankiewicz
approved these changes
Oct 15, 2026
Abacn
added a commit
that referenced
this pull request
Oct 15, 2026
* Partly revert #40595: setCompileAndRuntimeJavaVersion logic wasn't stale it's needed to resolve errorprone x Gradle known issue compatibility * Clean up Java8 leftovers in setJavaVerOptions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
-source/-targetwith--releaseas we no longer support Java8 (that did not recognize--release)Enable ErrorProne and CheckerFramework in Java21 when fork compiler
Suppress
removalin JmsIOAfter #38729, JmsIO requires Java17+.
In Presubmit, we use Java21, and set
--release 17for JmsIO.In Nightly Release, we set Java version to 11 and use
-Pjava21Home=..., instructing jms component compiled with a forked compiler. JDK 21's javac is invoked with-source 17 -target 17instead of--release 17, it compiles against JDK 21's java.base system classes (where Object.finalize() has forRemoval = true), triggering [removal].The fix is to use
--releaseeverywhere.-source x -target xwas due to Java8 not supporting--releaseflag and no longer needed.