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 bacf57fbe56..47d4d6471da 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 @@ -136,10 +136,8 @@ public final class NonStaticImport extends BugChecker implements CompilationUnit "newBuilder", "newInstance", "of", - "ONE", "parse", - "valueOf", - "ZERO"); + "valueOf"); /** Instantiates a new {@link NonStaticImport} instance. */ public NonStaticImport() {} diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonStaticImportTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonStaticImportTest.java index 86ef74d4e6f..bdad493c4bb 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonStaticImportTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonStaticImportTest.java @@ -72,7 +72,7 @@ void identification() { "import java.time.ZoneOffset;", "import java.util.Locale;", "import java.util.Map;", - "import pkg.A.Wrapper.ZERO;", + "import pkg.A.Wrapper.INSTANCE;", "", "class A {", " private Integer MIN_VALUE = 12;", @@ -92,7 +92,7 @@ void identification() { " empty();", "", " list();", - " new ZERO();", + " new INSTANCE();", " }", "", " static final class WithMethodThatIsSelectivelyFlagged {", @@ -102,7 +102,7 @@ void identification() { " }", "", " static final class Wrapper {", - " static final class ZERO {}", + " static final class INSTANCE {}", " }", "}") .doTest();