Skip to content

Commit 23f27f8

Browse files
Replace getDisplayName() and getDescription() methods with fields
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.UseDisplayNameAndDescriptionFields?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <team@moderne.io>
1 parent 66998e2 commit 23f27f8

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/main/java/org/openrewrite/java/dropwizard/method/RemoveUnnecessarySuperCalls.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.openrewrite.java.dropwizard.method;
1717

18+
import lombok.Getter;
1819
import org.jspecify.annotations.Nullable;
1920
import org.openrewrite.ExecutionContext;
2021
import org.openrewrite.Recipe;
@@ -25,15 +26,11 @@
2526

2627
public class RemoveUnnecessarySuperCalls extends Recipe {
2728

28-
@Override
29-
public String getDisplayName() {
30-
return "Remove `super` calls when the class does not extend another class";
31-
}
29+
@Getter
30+
final String displayName = "Remove `super` calls when the class does not extend another class";
3231

33-
@Override
34-
public String getDescription() {
35-
return "Removes calls to `super(...)` or `super.someMethod(...)` if the class does not have a real superclass besides `java.lang.Object`.";
36-
}
32+
@Getter
33+
final String description = "Removes calls to `super(...)` or `super.someMethod(...)` if the class does not have a real superclass besides `java.lang.Object`.";
3734

3835
@Override
3936
public JavaIsoVisitor<ExecutionContext> getVisitor() {

0 commit comments

Comments
 (0)