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.

What's here


Related content

PMD - Lightning rules




Last modified on Jun 10, 2020