Skip to content

Commit 1565e78

Browse files
refactor: Add missing @Override to overriding and implementing methods
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.MissingOverrideAnnotation?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne <[email protected]>
1 parent 798a87e commit 1565e78

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/main/java/org/openrewrite/java/testing/junit5/AssertTrueInstanceofToAssertInstanceOf.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public String getDescription() {
3636
return "Migration of JUnit4 (or potentially JUnit5) test case in form of assertTrue(x instanceof y) to assertInstanceOf(y.class, x).";
3737
}
3838

39+
@Override
3940
public TreeVisitor<?, ExecutionContext> getVisitor() {
4041
return new JavaIsoVisitor<ExecutionContext>() {
4142

src/main/java/org/openrewrite/java/testing/junit5/RemoveDuplicateTestTemplates.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ public class RemoveDuplicateTestTemplates extends Recipe {
2929
private static final AnnotationMatcher TEST_ANNOTATION_MATCHER = new AnnotationMatcher("@org.junit.jupiter.api.Test");
3030
private static final AnnotationMatcher REPEATED_TEST_ANNOTATION_MATCHER = new AnnotationMatcher("@org.junit.jupiter.api.RepeatedTest");
3131

32+
@Override
3233
public String getDisplayName() {
3334
return "Remove duplicates uses of @TestTemplate implementations for a single method";
3435
}
3536

37+
@Override
3638
public String getDescription() {
3739
return "Remove duplicates uses of @TestTemplate implementations for a single method.";
3840
}
3941

42+
@Override
4043
public TreeVisitor<?, ExecutionContext> getVisitor() {
4144
return Preconditions.check(
4245
new UsesType<>("org.junit.jupiter.api.RepeatedTest", false),

src/test/java/org/openrewrite/java/testing/junit5/RemoveTryCatchFailBlocksTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
@SuppressWarnings({"NumericOverflow", "divzero", "TryWithIdenticalCatches"})
2929
class RemoveTryCatchFailBlocksTest implements RewriteTest {
30+
@Override
3031
public void defaults(RecipeSpec spec) {
3132
spec
3233
.parser(JavaParser.fromJavaVersion()

0 commit comments

Comments
 (0)