diff --git a/changelog/@unreleased/pr-1095.v2.yml b/changelog/@unreleased/pr-1095.v2.yml new file mode 100644 index 000000000..db2c5643b --- /dev/null +++ b/changelog/@unreleased/pr-1095.v2.yml @@ -0,0 +1,7 @@ +type: fix +fix: + description: When building with Java13, two more error-prone checks (`UnnecessaryLambda` + and `ThrowSpecificity`) are turned off to avoid NoSuchMethodErrors in the compiler. + They still run if your project builds on Java8 or 11. + links: + - https://github.com/palantir/gradle-baseline/pull/1095 diff --git a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.java b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.java index 65244614a..56e7362ac 100644 --- a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.java +++ b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.java @@ -211,6 +211,8 @@ private static void configureErrorProneOptions( // https://github.com/google/error-prone/issues/1106 errorProneOptions.check("TypeParameterUnusedInFormals", CheckSeverity.OFF); errorProneOptions.check("PreferCollectionConstructors", CheckSeverity.OFF); + errorProneOptions.check("UnnecessaryLambda", CheckSeverity.OFF); + errorProneOptions.check("ThrowSpecificity", CheckSeverity.OFF); } if (javaCompile.equals(compileRefaster)) {