We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a69103 commit 3440aa3Copy full SHA for 3440aa3
java/ql/lib/semmle/code/java/controlflow/UnreachableBlocks.qll
@@ -211,7 +211,7 @@ class UnreachableBasicBlock extends BasicBlock {
211
// expression in an assert statement, or a catch clause.
212
forall(BasicBlock bb | bb = this.getABBPredecessor() | bb instanceof UnreachableBasicBlock) and
213
not exists(Callable c | c.getBody().getControlFlowNode() = this.getFirstNode()) and
214
- not exists(AssertStmt a | a = this.getFirstNode().asExpr().getEnclosingStmt()) and
+ not this.getFirstNode().asExpr().getEnclosingStmt() instanceof AssertStmt and
215
not this.getFirstNode().asStmt() instanceof CatchClause
216
or
217
// Switch statements with a constant comparison expression may have unreachable cases.
0 commit comments