Query module EmptyBlock

name
Empty branch of conditional, or empty loop body
description
An undocumented empty block or statement hinders readability. It may also indicate incomplete code.
kind
problem
problem.severity
warning
precision
low
id
java/empty-block
tags
reliability readability

Imports

Statement

Provides classes and predicates for working with Java statements.

Predicates

blockParent

Empty blocks or empty statements should not occur as immediate children of if-statements or loops. Empty blocks should not occur within other blocks.

emptyBody

An empty statement or an empty block.