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 5319d0d commit c671038
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public String getDescription() {
return "Use `String.contentEquals(CharSequence)` instead of `String.equals(CharSequence.toString())`.";
}

@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return Preconditions.check(PRECONDITION, new EqualsToContentEqualsVisitor());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public String getDescription() {
" the contents of the array. `Arrays.toString(array)` should be used instead as it gives the contents of the array.";
}

@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return new RemoveToStringFromArraysVisitor();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public Duration getEstimatedEffortPerOccurrence() {
@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return Preconditions.check(new UsesMethod<>(GET_PROPERTY), new JavaVisitor<ExecutionContext>() {
@Override
public J visitMethodInvocation(J.MethodInvocation method, ExecutionContext ctx) {
J.MethodInvocation invocation = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);

Expand Down

0 comments on commit c671038

Please sign in to comment.