Assignment can be replaced with operator assignment
Reports assignments which can be replaced by an operator assignment.
Example:
a = a + b
After the quick-fix is applied:
a += b
Configure the inspection:
Use the Ignore conditional operators option to ignore
&&
and||
operators.Use the Ignore obscure operators option to ignore
^
and%
operators.
Inspection options
Option | Type | Default |
---|---|---|
Ignore conditional operators | Checkbox | true |
Ignore obscure operators | Checkbox | false |
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Groovy, 233.SNAPSHOT |
Last modified: 13 July 2023