Skip to content

Commit 0b3c90b

Browse files
committed
Java: Fix whitespace query.
1 parent 34e6679 commit 0b3c90b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/ql/src/Likely Bugs/Arithmetic/WhitespaceContradictsPrecedence.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ int operatorWS(BinaryExpr expr) {
145145
predicate interestingNesting(BinaryExpr inner, BinaryExpr outer) {
146146
inner = outer.getAChildExpr() and
147147
not inner instanceof AssocNestedExpr and
148-
not inner instanceof HarmlessNestedExpr
148+
not inner instanceof HarmlessNestedExpr and
149+
not inner.isParenthesized()
149150
}
150151

151152
from BinaryExpr inner, BinaryExpr outer, int wsouter, int wsinner

0 commit comments

Comments
 (0)