Skip to content

Commit

Permalink
sonar issue correction
Browse files Browse the repository at this point in the history
  • Loading branch information
David DE CARVALHO committed Dec 19, 2023
1 parent 46dfa47 commit 5b36bc4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class AvoidConcatenateStringsInLoop extends IssuableSubscriptionVisitor {
public static final String MESSAGE_RULE = "Don't concatenate Strings in loop, use StringBuilder instead.";
private static final String STRING_CLASS = String.class.getName();

private final StringConcatenationVisitor VISITOR = new StringConcatenationVisitor();
private final StringConcatenationVisitor visitor = new StringConcatenationVisitor();

@Override
public List<Tree.Kind> nodesToVisit() {
Expand All @@ -54,7 +54,7 @@ public List<Tree.Kind> nodesToVisit() {

@Override
public void visitNode(@Nonnull Tree tree) {
tree.accept(VISITOR);
tree.accept(visitor);
}

private class StringConcatenationVisitor extends BaseTreeVisitor {
Expand All @@ -75,10 +75,10 @@ public void visitAssignmentExpression(AssignmentExpressionTree tree) {
super.visitAssignmentExpression(tree);
}
}
}

private boolean isStringType(ExpressionTree expressionTree) {
return expressionTree.symbolType().is(STRING_CLASS);
private boolean isStringType(ExpressionTree expressionTree) {
return expressionTree.symbolType().is(STRING_CLASS);
}
}

}

0 comments on commit 5b36bc4

Please sign in to comment.