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

Module UnreachableBlocks

Provides classes and predicates for identifying unreachable blocks under a “closed-world” assumption.

Import path

import semmle.code.java.controlflow.UnreachableBlocks

Imports

Guards

Provides classes and predicates for reasoning about guards and the control flow elements controlled by those guards.

java

Provides all default Java QL imports.

Classes

ConstSwitchStmt

A switch statement that always selects the same case.

ConstantExpr

An expression that evaluates to a constant at runtime.

ConstantField

A field which contains a constant of an immutable type.

ConstantMethod

A method that returns a single constant value, and is not overridden.

ExcludedConstantField

A field that appears constant, but should not be considered constant when determining ConstantExpr, and, consequently, in the unreachable blocks analysis.

UnreachableBasicBlock

An unreachable basic block is one that is dominated by a condition that never holds.

UnreachableExpr

An unreachable expression is an expression contained in an UnreachableBasicBlock.

UnreachableStmt

An unreachable statement is a statement contained in an UnreachableBasicBlock.