fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/graph/AssociationSet.java

Summary

Maintainability
A
0 mins
Test Coverage

These nested if statements could be combined
Open

            if (indexOf(newValue.getOther()) >= 0) {
                return false;
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

There are no issues that match your filters.

Category
Status