diff --git a/.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml b/.github/workflows/beam_PreCommit_Java_HBase_IO_Direct.yml index 35d00af9aafd..a16d013b4b2a 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 8298eacff4d2..c0ae4feb5909 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 { 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