Inspectopedia Help

Statement with empty body

Reports if, while, do or for statements with empty bodies. While occasionally intended, this construction is confusing, and often the result of a typo.

Example:

if (condition) {} while(true){}

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Groovy, 233.SNAPSHOT

Last modified: 13 July 2023