Skip to content

Commit ef6ea71

Browse files
committed
Revert unnecessary exists statement
1 parent 47e3d7d commit ef6ea71

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

java/ql/lib/semmle/code/java/controlflow/internal/GuardsLogic.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,9 @@ predicate implies_v1(Guard g1, boolean b1, Guard g2, boolean b2) {
5555
)
5656
)
5757
or
58-
exists(DefaultCase sc | g1 = sc |
59-
sc.getSwitch().getAConstCase() = g2 and b1 = true and b2 = false
60-
)
58+
g1.(DefaultCase).getSwitch().getAConstCase() = g2 and b1 = true and b2 = false
6159
or
62-
exists(DefaultCase sc | g1 = sc |
63-
sc.getSwitchExpr().getAConstCase() = g2 and b1 = true and b2 = false
64-
)
60+
g1.(DefaultCase).getSwitchExpr().getAConstCase() = g2 and b1 = true and b2 = false
6561
or
6662
exists(MethodCall check, int argIndex | check = g1 |
6763
conditionCheckArgument(check, argIndex, _) and

0 commit comments

Comments
 (0)