From e15d17b811a380177dad277d0ccffa35d74178d1 Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Thu, 9 May 2024 20:42:34 -0700 Subject: [PATCH] Fix RenameMethodsNamedHashcodeEqualOrToString class name casing --- ...ng.java => RenameMethodsNamedHashcodeEqualOrToString.java} | 2 +- .../resources/META-INF/rewrite/common-static-analysis.yml | 2 +- .../RenameMethodsNamedHashcodeEqualOrTostringTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/org/openrewrite/staticanalysis/{RenameMethodsNamedHashcodeEqualOrTostring.java => RenameMethodsNamedHashcodeEqualOrToString.java} (98%) diff --git a/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java b/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrToString.java similarity index 98% rename from src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java rename to src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrToString.java index 9ad7044f4..23bb0f734 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java +++ b/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrToString.java @@ -31,7 +31,7 @@ import java.util.Collections; import java.util.Set; -public class RenameMethodsNamedHashcodeEqualOrTostring extends Recipe { +public class RenameMethodsNamedHashcodeEqualOrToString extends Recipe { private static final MethodMatcher NO_ARGS = new MethodMatcher("*..* *()", true); private static final MethodMatcher OBJECT_ARG = new MethodMatcher("*..* *(java.lang.Object)", true); diff --git a/src/main/resources/META-INF/rewrite/common-static-analysis.yml b/src/main/resources/META-INF/rewrite/common-static-analysis.yml index 2c01c6bf8..598e11499 100644 --- a/src/main/resources/META-INF/rewrite/common-static-analysis.yml +++ b/src/main/resources/META-INF/rewrite/common-static-analysis.yml @@ -70,7 +70,7 @@ recipeList: # - org.openrewrite.staticanalysis.RemoveUnusedLocalVariables # - org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods - org.openrewrite.staticanalysis.RenameLocalVariablesToCamelCase - - org.openrewrite.staticanalysis.RenameMethodsNamedHashcodeEqualOrTostring + - org.openrewrite.staticanalysis.RenameMethodsNamedHashcodeEqualOrToString - org.openrewrite.staticanalysis.RenamePrivateFieldsToCamelCase - org.openrewrite.staticanalysis.ReplaceLambdaWithMethodReference - org.openrewrite.staticanalysis.ReplaceStringBuilderWithString diff --git a/src/test/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostringTest.java b/src/test/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostringTest.java index 1c53b2ccb..ed9542817 100644 --- a/src/test/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostringTest.java +++ b/src/test/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostringTest.java @@ -23,11 +23,11 @@ import static org.openrewrite.java.Assertions.java; @SuppressWarnings({"MethodMayBeStatic", "MisspelledEquals", "BooleanMethodNameMustStartWithQuestion"}) -class RenameMethodsNamedHashcodeEqualOrTostringTest implements RewriteTest { +class RenameMethodsNamedHashcodeEqualOrToStringTest implements RewriteTest { @Override public void defaults(RecipeSpec spec) { - spec.recipe(new RenameMethodsNamedHashcodeEqualOrTostring()); + spec.recipe(new RenameMethodsNamedHashcodeEqualOrToString()); } @DocumentExample