Avoid Using If…Else Statements Without Using Curly Braces

< 1 min read

Impact Area

Manageability

Severity

Medium

Affected Element

Lightning

Rule ID #

SF-0062

Impact #

Not including braces in conditional and loop statements may cause unexpected behavior.

Remediation #

Use braces to surround all code blocks.

Time to fix #

30 min

References #

See the PMD documentation article: IfElseStmtsMustUseBraces.

Updated on March 21, 2025
Was it helpful ?