Files
codeql/java/ql/test/library-tests/guards/guardspreconditions.ql
2026-02-23 15:09:52 +01:00

11 lines
341 B
Plaintext

import java
import semmle.code.java.controlflow.Guards
import utils.test.BasicBlock
from Guard g, BasicBlock bb, GuardValue gv
where
g.valueControls(bb, gv) and
g.getEnclosingCallable().getDeclaringType().hasName("Preconditions") and
(gv.isThrowsException() or gv.getDualValue().isThrowsException())
select g, gv, getFirstAstNode(bb)