Inspection granularity: Allow "control flow without braces" single-liners
Issue #977
resolved
Title says it all. I'm pretty stringent about requiring braces, but I do like the brevity of single liners, especially for if statements that bail out or throw exceptions. e.g.,
if (viewsById == null) return;
if (rate == null) throw new InterestRateException(currentInterestDate);
Comments (3)
-
reporter -
reporter - changed status to resolved
Resolved in 2.0.1.9
-
repo owner Thanks for helping keep the house clean!
- Log in to comment
In fact, that might even make sense as options:
if
without braces (always)if
without braces forreturn
statementsif
without braces forthrow
statements