blob: 19ace08b1ae4aa2286978adff70b94061f4bdb7a [file] [view] [edit]
Branching constructs (`if` statements, `conditional` expressions) should contain
difference code in the two branches. Repeating identical code in both branches
is usually a bug.
For example:
```java
condition ? same : same
```
```java
if (condition) {
same();
} else {
same();
}
```
this usually indicates a typo where one of the branches was supposed to contain
different logic:
```java
condition ? something : somethingElse
```
```java
if (condition) {
doSomething();
} else {
doSomethingElse();
}
```