Inspectopedia Help

Redundant 'if' statement

Reports if statements which can be simplified to single assignment or return statements.


if (foo()) return true; else return false;

After the quick-fix is applied:

return foo();

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Groovy, 233.SNAPSHOT

Last modified: 13 July 2023