From fb5619806cf253073ced99891f9a39781b8a8a48 Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Fri, 15 Dec 2023 08:15:07 +0100 Subject: [PATCH 1/2] Disallow static import of `com.google.errorprone.{VisitorState,util.ASTHelpers}` members --- .../tech/picnic/errorprone/bugpatterns/NonStaticImport.java | 2 ++ 1 file changed, 2 insertions(+) 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 f913b93e09..3b6033829b 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 @@ -61,6 +61,8 @@ public final class NonStaticImport extends BugChecker implements CompilationUnit ImmutableSet.of( "com.google.common.base.Strings", "com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode", + "com.google.errorprone.util.ASTHelpers", + "com.google.errorprone.VisitorState", "java.time.Clock", "java.time.ZoneOffset"); From fd22854360ec6d6278b7c1ddf509232dfebd5039 Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Sat, 16 Dec 2023 13:20:25 +0100 Subject: [PATCH 2/2] Tweak --- .../tech/picnic/errorprone/bugpatterns/NonStaticImport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3b6033829b..8c5e2fa43a 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 @@ -61,8 +61,8 @@ public final class NonStaticImport extends BugChecker implements CompilationUnit ImmutableSet.of( "com.google.common.base.Strings", "com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode", - "com.google.errorprone.util.ASTHelpers", "com.google.errorprone.VisitorState", + "com.google.errorprone.util.ASTHelpers", "java.time.Clock", "java.time.ZoneOffset");