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.


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

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Groovy, 233.SNAPSHOT

Last modified: 13 July 2023