Sho SHIMIZU
Committed by Gerrit Code Review

Refactor: Simplify method

Change-Id: I84e88480d7b005db4585afa7f9296f8a2d7cbef3
...@@ -291,13 +291,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu ...@@ -291,13 +291,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
291 } 291 }
292 292
293 private boolean isAllowed(ConnectPoint circuitCp, ConnectPoint connectivityCp) { 293 private boolean isAllowed(ConnectPoint circuitCp, ConnectPoint connectivityCp) {
294 - ConnectPoint srcStaticPort = staticPort(circuitCp); 294 + ConnectPoint staticPort = staticPort(circuitCp);
295 - if (srcStaticPort != null) { 295 + return staticPort == null || staticPort.equals(connectivityCp);
296 - if (!srcStaticPort.equals(connectivityCp)) {
297 - return false;
298 - }
299 - }
300 - return true;
301 } 296 }
302 297
303 /** 298 /**
......