commit | 9fe0f36ab549f7184ee2bed1eba3e71e2f4d04ad | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Mon Feb 29 16:36:15 2016 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Mar 03 01:05:16 2016 +0000 |
tree | b57a449eb0ddde8f02ca008be33ebb6fd1491df2 | |
parent | aa00e500763c128d19a1b660f8998e852399cc57 [diff] |
Refactor: Simplify method Change-Id: I84e88480d7b005db4585afa7f9296f8a2d7cbef3
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java index 5e02f3c..2c54438 100644 --- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java +++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
@@ -291,13 +291,8 @@ } 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); } /**