Simplify hasNodeConnector method in Subnet class. 58/3758/1
authorAlissa Bonas <abonas@redhat.com>
Mon, 16 Dec 2013 15:15:21 +0000 (17:15 +0200)
committerAlissa Bonas <abonas@redhat.com>
Mon, 16 Dec 2013 15:15:21 +0000 (17:15 +0200)
Reduce 'if' conditions for improved readability.

Change-Id: I8ade7bd8546ddc3396c24e8cc3ba6e13abaaa07c
Signed-off-by: Alissa Bonas <abonas@redhat.com>
opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/Subnet.java

index f33fa18..16c09fe 100644 (file)
@@ -244,10 +244,7 @@ public class Subnet implements Cloneable, Serializable {
         if (p == null) {
             return false;
         }
-        if (this.isFlatLayer2()) {
-            return true;
-        }
-        return this.nodeConnectors.contains(p);
+        return isFlatLayer2() || nodeConnectors.contains(p);
     }
 
     public boolean isMutualExclusive(Subnet otherSubnet) {