Groovy
Pointless boolean expression
Warning
Code Style
Last modified: 03 December 2024Reports pointless or pointlessly complicated boolean expressions.
Such expressions include conjunction with true, disjunction with false, equality comparison with a boolean literal, or negation of a boolean literal. Such expressions may be the result of automated refactorings not completely followed through to completion, and in any case are unlikely to be what the developer intended to do.
Example:
if (someBool && true) {}
After the quick-fix is applied:
if (someBool) {}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
GroovyPointlessBoolean
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Groovy, 243.23126 |
Thanks for your feedback!
Was this page helpful?