From f246e6b9d76fd9e69b0def85333e17b9d8a77741 Mon Sep 17 00:00:00 2001 From: ccernat Date: Tue, 14 Feb 2023 20:24:26 +0100 Subject: [PATCH] Add more identifiers --- .../picnic/errorprone/bugpatterns/NonStaticImport.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 6c1b7b743e6..8676c305bd8 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 @@ -29,9 +29,7 @@ /** A {@link BugChecker} that flags methods and constants that should not be statically imported. */ // XXX: Also introduce checks that disallows the following candidates: // - `ZoneOffset.ofHours` and other `ofXXX`-style methods. -// - `java.time.Clock`. // - Several other `java.time` classes. -// - Likely any of `*.{ZERO, ONE, MIX, MAX, MIN_VALUE, MAX_VALUE}`. @AutoService(BugChecker.class) @BugPattern( summary = "Identifier should not be statically imported", @@ -108,7 +106,10 @@ public final class NonStaticImport extends BugChecker implements IdentifierTreeM "newBuilder", "newInstance", "of", - "valueOf"); + "ONE", + "parse", + "valueOf", + "ZERO"); /** Instantiates a new {@link NonStaticImport} instance. */ public NonStaticImport() {}