From 02d278d5f7357be5ec52ecb3c7f1013669f11a9f Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 5 Dec 2019 23:49:15 +0000 Subject: [PATCH 1/3] Turn off UnnecessaryLambda, ThrowSpecificity on Java 13 --- .../com/palantir/baseline/plugins/BaselineErrorProne.java | 2 ++ 1 file changed, 2 insertions(+) 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)) { From 1ed98103d2790ebed43358debff33e862f8829d5 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 5 Dec 2019 23:49:15 +0000 Subject: [PATCH 2/3] Add generated changelog entries --- changelog/@unreleased/pr-1095.v2.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/@unreleased/pr-1095.v2.yml diff --git a/changelog/@unreleased/pr-1095.v2.yml b/changelog/@unreleased/pr-1095.v2.yml new file mode 100644 index 000000000..9aee55b1e --- /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 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 From ff58fa723e2cd63d00a5f7d89db6c280fd8f10f8 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 5 Dec 2019 23:49:15 +0000 Subject: [PATCH 3/3] Add generated changelog entries --- changelog/@unreleased/pr-1095.v2.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog/@unreleased/pr-1095.v2.yml b/changelog/@unreleased/pr-1095.v2.yml index 9aee55b1e..db2c5643b 100644 --- a/changelog/@unreleased/pr-1095.v2.yml +++ b/changelog/@unreleased/pr-1095.v2.yml @@ -1,7 +1,7 @@ type: fix fix: - description: When building with Java13, two more error-prone checks are turned off - to avoid NoSuchMethodErrors in the compiler. They still run if your project builds - on Java8 or 11. + 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