Skip to content

Commit

Permalink
For consistency with other code
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Sep 21, 2024
1 parent 3f24003 commit 670314e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public RedundantStringEscape() {}
@Override
public Description matchLiteral(LiteralTree tree, VisitorState state) {
String constant = ASTHelpers.constValue(tree, String.class);
if (constant == null || constant.indexOf('\'') == -1) {
if (constant == null || constant.indexOf('\'') < 0) {
/* Fast path: this isn't a string constant with a single quote. */
return Description.NO_MATCH;
}
Expand Down

0 comments on commit 670314e

Please sign in to comment.