Skip to content

Commit 6131c68

Browse files
aschackmullhvitved
andauthored
Update java/ql/lib/semmle/code/java/ControlFlowGraph.qll
Co-authored-by: Tom Hvitved <[email protected]>
1 parent d0d4780 commit 6131c68

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,9 +1123,12 @@ private module ControlFlowGraphImpl {
11231123
or
11241124
// `assert` statements may throw
11251125
completion = ThrowCompletion(assertionError()) and
1126-
if exists(assertstmt.getMessage())
1127-
then last(assertstmt.getMessage(), last, NormalCompletion())
1128-
else last(assertstmt.getExpr(), last, BooleanCompletion(false, _))
1126+
(
1127+
last(assertstmt.getMessage(), last, NormalCompletion())
1128+
or
1129+
not exists(assertstmt.getMessage()) and
1130+
last(assertstmt.getExpr(), last, BooleanCompletion(false, _))
1131+
)
11291132
)
11301133
or
11311134
// `throw` statements or throwing calls give rise to `Throw` completion

0 commit comments

Comments
 (0)