Skip to content

Commit

Permalink
Disable optimizeOuterThis when building with JDK > 8 (#23902)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNeuralBit authored Oct 31, 2022
1 parent abb932e commit 1e72e60
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,9 @@ class BeamModulePlugin implements Plugin<Project> {
if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) == 0
&& JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
options.compilerArgs += ['--release', '8']
// TODO(https://github.com/apache/beam/issues/23901): Fix
// optimizerOuterThis breakage
options.compilerArgs += ['-XDoptimizeOuterThis=false']
}
// As we want to add '-Xlint:-deprecation' we intentionally remove '-Xlint:deprecation' from compilerArgs here,
// as intellij is adding this, see https://youtrack.jetbrains.com/issue/IDEA-196615
Expand Down

0 comments on commit 1e72e60

Please sign in to comment.