Avoid Assignments In Operands

< 1 min read

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.

Updated on March 21, 2025
Was it helpful ?