Back to Intellij Community

GroovyTrivialConditional

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyTrivialConditional.html

2025.3-rc-2207 B
Original Source

Reports ternary conditional operators of the form x ? true : false or similar, which can be trivially simplified.

Example:

foo() ? true : false

After the quick-fix is applied:

foo()