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.