CodeQL library for Java
codeql/java-all 0.3.2 (changelog, source)
Search

Predicate nullCheckMethod

Holds if the evaluation of a call to m resulting in the value branch implies that the argument to the call is guaranteed to be null if isnull is true, and non-null if isnull is false.

Import path

import semmle.code.java.dataflow.NullGuards
predicate nullCheckMethod(Method m, boolean branch, boolean isnull)