Avoid assignments in operands
Impact area
Manageability
Severity
Medium
Affected element
Lightning
Rule ID
SF-0060
Impact
Assignments in operands make code more complicated and harder to read. Also it can be a signal of a poorly-defined equality operator (assignment operator ‘=
’ was used instead of the equality operator ‘==
’."") which will produce unwanted results.
Remediation
This is sometime indicative of the bug where the assignment operator ‘=’ was used instead of the equality operator ‘==
’.""
Time to fix
30 min
References
See the PMD documentation article: AssignmentInOperand.