Sho SHIMIZU
Committed by Gerrit Code Review

Refactor: Flip condition to reduce the depth of indentation

Change-Id: I572a989730a8dd93b5ab7ee63b37bc9d728c17e7
......@@ -373,7 +373,10 @@ public class IntentManager
private void applyIntentData(IntentData data,
FlowRuleOperations.Builder builder,
Direction direction) {
if (data != null) {
if (data == null) {
return;
}
List<Intent> intentsToApply = data.installables();
if (!intentsToApply.stream().allMatch(x -> x instanceof FlowRuleIntent)) {
throw new IllegalStateException("installable intents must be FlowRuleIntent");
......@@ -405,7 +408,6 @@ public class IntentManager
rules.forEach(builder::remove);
}
}
}
}
......