This is an automated email from the ASF dual-hosted git repository.
shunping pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 0c61055eb85 Fix PreCommit IOs with Java11 (#39343)
0c61055eb85 is described below
commit 0c61055eb85328d7b6d24f215642c78dbc969f65
Author: Yi Hu <[email protected]>
AuthorDate: Wed Jul 15 14:54:34 2026 -0400
Fix PreCommit IOs with Java11 (#39343)
---
.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml | 2 ++
.../src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml
b/.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml
index 35d00af9aaf..a16d013b4b2 100644
--- a/.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml
+++ b/.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml
@@ -87,6 +87,8 @@ jobs:
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
- name: Setup environment
uses: ./.github/actions/setup-environment-action
+ with:
+ java-vesion: 11
- name: run HBase IO build script
uses: ./.github/actions/gradle-command-self-hosted-action
with:
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 8298eacff4d..c0ae4feb590 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -993,6 +993,13 @@ class BeamModulePlugin implements Plugin<Project> {
if (!project.findProperty("java${ver}Home")) {
return
}
+ // TODO(yathu): remove this once generated code (antlr) no longer
trigger "this-escape", see above
+ // Unpin global opts when ver is lower than current
+ if (JavaVersion.current().compareTo(JavaVersion.VERSION_21) >= 0 &&
JavaVersion.toVersion(ver) < JavaVersion.VERSION_21) {
+ options.compilerArgs -= [
+ '-Xlint:-this-escape',
+ ]
+ }
if (ver == '8') {
def java8Home = project.findProperty("java8Home")
options.fork = true