Sho SHIMIZU
Committed by Gerrit Code Review

Refactor: Simplify method

Change-Id: I84e88480d7b005db4585afa7f9296f8a2d7cbef3
......@@ -291,13 +291,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
}
private boolean isAllowed(ConnectPoint circuitCp, ConnectPoint connectivityCp) {
ConnectPoint srcStaticPort = staticPort(circuitCp);
if (srcStaticPort != null) {
if (!srcStaticPort.equals(connectivityCp)) {
return false;
}
}
return true;
ConnectPoint staticPort = staticPort(circuitCp);
return staticPort == null || staticPort.equals(connectivityCp);
}
/**
......