Groovy
Pointless arithmetic expression
Warning
Performance
Last modified: 03 December 2024Reports pointless arithmetic expressions.
Such expressions include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. 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:
a + 0
After the quick-fix is applied:
a
- 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.
GroovyPointlessArithmetic
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Groovy, 243.23126 |
Thanks for your feedback!
Was this page helpful?