Avoid Using “while” Statements Without Using Curly Braces

Impact Area

Manageability

Severity

Medium

Affected Element

Lightning

Rule ID #

SF-0068

Impact #

Not using braces is error prone and complicates debugging.

Remediation #

Use braces to surround all code blocks.

Time to fix #

30 min

References #

See the PMD documentation article: WhileLoopsMustUseBraces.

Was it helpful ?

THE AI CODE GOVERNANCE BRIEF

Sign up for new updates!