Skip to content

Commit f668110

Browse files
committed
Fix next-normal-statement predicate
1 parent bc0724e commit f668110

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

java/ql/lib/semmle/code/java/ControlFlowGraph.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,9 @@ private module ControlFlowGraphImpl {
781781
getSwitchStatement(switch, i) = pred and
782782
getSwitchStatement(switch, i + 1) = immediateSucc and
783783
(
784-
succ = immediateSucc and
785-
not immediateSucc instanceof PatternCase
786-
or
787-
isNextNormalSwitchStmt(switch, immediateSucc, succ)
784+
if immediateSucc instanceof PatternCase
785+
then isNextNormalSwitchStmt(switch, immediateSucc, succ)
786+
else succ = immediateSucc
788787
)
789788
)
790789
}

0 commit comments

Comments
 (0)