Repository navigation
Restore Java 11 support in setJavaVerOptions - #40634
Merged
Merged
Conversation
the '11' branch. Workflows that still pass -PtestJavaVersion=11 now fail while Gradle configures the projects: Unknown Java Version 11 for setting additional java options
shunping
marked this pull request as ready for review
October 16, 2026 16:22
Contributor
There was a problem hiding this comment.
📋 Review Summary
This PR restores the ver == '11' handling in setJavaVerOptions within BeamModulePlugin.groovy, which was inadvertently removed during the Java 8 cleanup in #40620. The change is clean, accurate, and unbreaks workflows running with -PtestJavaVersion=11.
🔍 General Feedback
- The no-op branch for Java 11 in
setJavaVerOptionsproperly prevents falling into theelsebranch (which throws aGradleExceptionfor unknown Java versions) while relying on the commonforkOptions.javaHomeconfiguration above it.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
derrickaw
approved these changes
Oct 16, 2026
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.
Follow-up to #40620.
Problem
#40620 removed the Java 8 code from
setJavaVerOptionsinBeamModulePlugin.groovy, and thever == '11'branch was removed with it. Java 11 is still in use, though:compileTestJavastill acceptstestJavaVersionvalues of['11', '17', '21', '25'].-PtestJavaVersion=11:beam_PreCommit_Java_IOs_Directbeam_PreCommit_Java_Examples_Dataflow_Java11(disabled)As a result https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_IOs_Direct.yml is currently red.