fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/ext/petaf/messages/ConnectMessage.java

Summary

Maintainability
A
0 mins
Test Coverage

These nested if statements could be combined
Open

            if (sender.sendMessage(acceptTaskSend)) {
                this.getReceiver().withOnline(true);
            }

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