Skip to content

Commit

Permalink
refactor: Add missing @Override to overriding and implementing methods
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Mar 12, 2024
1 parent 798a87e commit 1565e78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public String getDescription() {
return "Migration of JUnit4 (or potentially JUnit5) test case in form of assertTrue(x instanceof y) to assertInstanceOf(y.class, x).";
}

@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return new JavaIsoVisitor<ExecutionContext>() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ public class RemoveDuplicateTestTemplates extends Recipe {
private static final AnnotationMatcher TEST_ANNOTATION_MATCHER = new AnnotationMatcher("@org.junit.jupiter.api.Test");
private static final AnnotationMatcher REPEATED_TEST_ANNOTATION_MATCHER = new AnnotationMatcher("@org.junit.jupiter.api.RepeatedTest");

@Override
public String getDisplayName() {
return "Remove duplicates uses of @TestTemplate implementations for a single method";
}

@Override
public String getDescription() {
return "Remove duplicates uses of @TestTemplate implementations for a single method.";
}

@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return Preconditions.check(
new UsesType<>("org.junit.jupiter.api.RepeatedTest", false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

@SuppressWarnings({"NumericOverflow", "divzero", "TryWithIdenticalCatches"})
class RemoveTryCatchFailBlocksTest implements RewriteTest {
@Override
public void defaults(RecipeSpec spec) {
spec
.parser(JavaParser.fromJavaVersion()
Expand Down

0 comments on commit 1565e78

Please sign in to comment.