Inspectopedia Help

Statement with empty body

Reports if, while, do, for, and switch statements with empty bodies.

While occasionally intended, such code is confusing and is often the result of a typo.

This inspection is disabled in JSP files.

Inspection options

Option

Type

Default

Include statement bodies that are empty code blocks

Checkbox

true

Comments count as content

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023