Skip to content

Restore Java 11 support in setJavaVerOptions - #40634

Merged
shunping merged 2 commits into
apache:masterfrom
shunping:fix-java-workflow-1
Oct 16, 2026
Merged

shunping merged 2 commits into
apache:masterfrom
shunping:fix-java-workflow-1

Conversation

@shunping

@shunping shunping commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #40620.

Problem

#40620 removed the Java 8 code from setJavaVerOptions in BeamModulePlugin.groovy, and the ver == '11' branch was removed with it. Java 11 is still in use, though:

  • compileTestJava still accepts testJavaVersion values of ['11', '17', '21', '25'].
  • These workflows still pass -PtestJavaVersion=11:
    • beam_PreCommit_Java_IOs_Direct
    • beam_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.

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
@github-actions github-actions Bot added the build label Oct 16, 2026
@shunping
shunping marked this pull request as ready for review October 16, 2026 16:22

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 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 setJavaVerOptions properly prevents falling into the else branch (which throws a GradleException for unknown Java versions) while relying on the common forkOptions.javaHome configuration above it.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@shunping
shunping merged commit 084fb32 into apache:master Oct 16, 2026
24 checks passed
@shunping
shunping deleted the fix-java-workflow-1 branch October 16, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants