From 7d2a94d4caf0b93da169a025adf3cf56507109ff Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Sun, 29 Dec 2024 20:51:02 +0100 Subject: [PATCH] Move over from other PR --- .../errorprone/bugpatterns/ExplicitArgumentEnumeration.java | 2 +- .../tech/picnic/errorprone/bugpatterns/NonStaticImport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitArgumentEnumeration.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitArgumentEnumeration.java index 7770efe93c..8deed25125 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitArgumentEnumeration.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitArgumentEnumeration.java @@ -113,7 +113,7 @@ public final class ExplicitArgumentEnumeration extends BugChecker .put(OBJECT_ENUMERABLE_ASSERT, "doesNotContainAnyElementsOf", "doesNotContain") .put(OBJECT_ENUMERABLE_ASSERT, "hasSameElementsAs", "containsOnly") .put(STEP_VERIFIER_STEP, "expectNextSequence", "expectNext") - .build(); + .buildOrThrow(); /** Instantiates a new {@link ExplicitArgumentEnumeration} instance. */ public ExplicitArgumentEnumeration() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java index eba7253b54..aca3b6af0c 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonStaticImport.java @@ -182,7 +182,7 @@ private static ImmutableTable getUndesire } } - return imports.build(); + return imports.buildOrThrow(); } private static boolean shouldNotBeStaticallyImported(String type, String member) {