This rule is Obsolete | |
Synopsis: | These nested if statements could be combined |
Language: | Java |
Severity Level: | 6 |
Category: | Basic |
Description: |
Sometimes two 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.public class Foo { void bar() { if (x) { if (y) { // do stuff } } } } |