CodeQL library for Java/Kotlin
codeql/java-all 4.2.1-dev (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)