From e9c0ef0d9ae15f993ad674a996a5cbfc08f07ee8 Mon Sep 17 00:00:00 2001 From: Carter Kozak Date: Mon, 8 Mar 2021 12:39:44 -0500 Subject: [PATCH 1/2] PreferImmutableStreamExCollections is disabled by default The suggested replacement is too risky, potentially causing failures at runtime. --- .../baseline/extensions/BaselineErrorProneExtension.java | 1 - .../com/palantir/baseline/plugins/BaselineErrorProne.java | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/extensions/BaselineErrorProneExtension.java b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/extensions/BaselineErrorProneExtension.java index 57abea4cd..17959a41d 100644 --- a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/extensions/BaselineErrorProneExtension.java +++ b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/extensions/BaselineErrorProneExtension.java @@ -71,7 +71,6 @@ public class BaselineErrorProneExtension { // TODO(ckozak): re-enable pending scala check // "ThrowSpecificity", "UnsafeGaugeRegistration", - "PreferImmutableStreamExCollections", // Built-in checks "ArrayEquals", 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 d71148da8..a959a46cd 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 @@ -219,7 +219,11 @@ private static void configureErrorProneOptions( : CheckSeverity.OFF; })); - errorProneOptions.disable("AutoCloseableMustBeClosed", "CatchSpecificity", "UnusedVariable"); + errorProneOptions.disable( + "AutoCloseableMustBeClosed", + "CatchSpecificity", + "PreferImmutableStreamExCollections", + "UnusedVariable"); errorProneOptions.error( "EqualsHashCode", "EqualsIncompatibleType", From 8b039f3c0983d39fbe5e6ed179e61de816f0319f Mon Sep 17 00:00:00 2001 From: Carter Kozak Date: Mon, 8 Mar 2021 17:39:44 +0000 Subject: [PATCH 2/2] Add generated changelog entries --- changelog/@unreleased/pr-1681.v2.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/@unreleased/pr-1681.v2.yml diff --git a/changelog/@unreleased/pr-1681.v2.yml b/changelog/@unreleased/pr-1681.v2.yml new file mode 100644 index 000000000..0e8915e87 --- /dev/null +++ b/changelog/@unreleased/pr-1681.v2.yml @@ -0,0 +1,5 @@ +type: fix +fix: + description: PreferImmutableStreamExCollections is disabled by default + links: + - https://github.com/palantir/gradle-baseline/pull/1681