From c53a3f64b6ecf40e8b70f56e6bf5d4cb6d8f5acc Mon Sep 17 00:00:00 2001 From: Philip Leonard Date: Tue, 23 May 2023 09:31:59 +0200 Subject: [PATCH] Qualify non-static `TestMode` imports across `BugChecker` test classes (#630) Prefer non-static imports and qualification of `BugCheckerRefactoringTestHelper#TestMode` members across bug checker test classes. --- .../picnic/errorprone/bugpatterns/AssertJIsNullTest.java | 5 ++--- .../tech/picnic/errorprone/bugpatterns/NonEmptyMonoTest.java | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/AssertJIsNullTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/AssertJIsNullTest.java index 706a835de9..9ba9e0ad09 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/AssertJIsNullTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/AssertJIsNullTest.java @@ -1,8 +1,7 @@ package tech.picnic.errorprone.bugpatterns; -import static com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode.TEXT_MATCH; - import com.google.errorprone.BugCheckerRefactoringTestHelper; +import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode; import com.google.errorprone.CompilationTestHelper; import org.junit.jupiter.api.Test; @@ -54,6 +53,6 @@ void replacement() { " assertThat(\"foo\").isNull();", " }", "}") - .doTest(TEXT_MATCH); + .doTest(TestMode.TEXT_MATCH); } } diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonEmptyMonoTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonEmptyMonoTest.java index ff33c78d4a..7080382357 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonEmptyMonoTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/NonEmptyMonoTest.java @@ -1,8 +1,7 @@ package tech.picnic.errorprone.bugpatterns; -import static com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode.TEXT_MATCH; - import com.google.errorprone.BugCheckerRefactoringTestHelper; +import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode; import com.google.errorprone.CompilationTestHelper; import org.junit.jupiter.api.Test; @@ -145,6 +144,6 @@ void replacement() { " Mono.just(2).hasElement();", " }", "}") - .doTest(TEXT_MATCH); + .doTest(TestMode.TEXT_MATCH); } }