From 922be965b1abcf5d272ab20c0e0e701f3e55ad2c Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Sat, 21 Sep 2024 11:06:06 +0200 Subject: [PATCH] For consistency with other code --- .../picnic/errorprone/bugpatterns/RedundantStringEscape.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java index e2bb0f5326..6e9690f7cc 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java @@ -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; }