Browse Source

Fix OperatorPrecedence warning flagged by error prone

Building with Bazel is failing with this error message:

HttpSupport.java:480: error: [OperatorPrecedence] Use grouping
parenthesis to make the operator precedence explicit
    if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
                             ^
    (see https://errorprone.info/bugpattern/OperatorPrecedence)
Did you mean 'if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {'?

Change-Id: I96089d3158d06ba981cfdf2b03865261b328de23
tags/v5.10.0.202011041322-m2
David Ostrovsky 3 years ago
parent
commit
f3bb71206c
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java View File

@@ -477,7 +477,7 @@ public class HttpSupport {
i++;
break;
default:
if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
i++;
break;
}

Loading…
Cancel
Save