Avoid Use Of The “==” Operator

Impact Area

Manageability

Severity

Medium

Affected Element

Lightning

Rule ID #

SF-0070

Impact #

Using == in conditions may lead to unexpected results, as the variables are automatically casted to be of the same type.

Remediation #

Use the === operator to evaluate conditions.

Time to fix #

30 min

References #

See the PMD documentation article: EqualComparison.

Was it helpful ?

THE AI CODE GOVERNANCE BRIEF

Sign up for new updates!