Avoid unreachable code

Use braces to surround all code blocks
Impact area

Manageability

Severity

Medium

Affected element

Lightning

Rule ID

SF-0067

Impact

A return, break, continue, or throw statement should be the last in a block. Statements after these will never execute. This is a bug, or extremely poor style.

Remediation

Remove any unreachable code segments.

Time to fix

30 min

References

See the PMD documentation article: UnreachableCode.

What's here


Related content

PMD - Lightning rules




Last modified on Jun 10, 2020