diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImplicitLocaleUsage.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StringCaseLocaleUsage.java similarity index 91% rename from error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImplicitLocaleUsage.java rename to error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StringCaseLocaleUsage.java index 05f6d8823f3..11b441229c2 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImplicitLocaleUsage.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StringCaseLocaleUsage.java @@ -30,11 +30,11 @@ @AutoService(BugChecker.class) @BugPattern( summary = "Specify a `Locale` when calling `String#to{Lower,Upper}Case`", - link = BUG_PATTERNS_BASE_URL + "ImplicitLocaleUsage", + link = BUG_PATTERNS_BASE_URL + "StringCaseLocaleUsage", linkType = CUSTOM, severity = WARNING, tags = FRAGILE_CODE) -public final class ImplicitLocaleUsage extends BugChecker implements MethodInvocationTreeMatcher { +public final class StringCaseLocaleUsage extends BugChecker implements MethodInvocationTreeMatcher { private static final long serialVersionUID = 1L; private static final Matcher DEFAULT_LOCALE_CASE_CONVERSION = instanceMethod() @@ -42,8 +42,8 @@ public final class ImplicitLocaleUsage extends BugChecker implements MethodInvoc .namedAnyOf("toLowerCase", "toUpperCase") .withNoParameters(); - /** Instantiates a new {@link ImplicitLocaleUsage} instance. */ - public ImplicitLocaleUsage() {} + /** Instantiates a new {@link StringCaseLocaleUsage} instance. */ + public StringCaseLocaleUsage() {} @Override public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ImplicitLocaleUsageTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/StringCaseLocaleUsageTest.java similarity index 94% rename from error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ImplicitLocaleUsageTest.java rename to error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/StringCaseLocaleUsageTest.java index 7d8e83db6da..f47b0c434cf 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ImplicitLocaleUsageTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/StringCaseLocaleUsageTest.java @@ -8,11 +8,11 @@ import com.google.errorprone.CompilationTestHelper; import org.junit.jupiter.api.Test; -final class ImplicitLocaleUsageTest { +final class StringCaseLocaleUsageTest { private final CompilationTestHelper compilationTestHelper = - CompilationTestHelper.newInstance(ImplicitLocaleUsage.class, getClass()); + CompilationTestHelper.newInstance(StringCaseLocaleUsage.class, getClass()); private final BugCheckerRefactoringTestHelper refactoringTestHelper = - newInstance(ImplicitLocaleUsage.class, getClass()); + newInstance(StringCaseLocaleUsage.class, getClass()); @Test void identification() {