Переглянути джерело

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 роки тому
джерело
коміт
f3bb71206c

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java Переглянути файл

@@ -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;
}

Завантаження…
Відмінити
Зберегти