Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Merge "Refactor Subnet.isSubnetOf - reduce number of 'if' statements. Added unitests."
[controller.git]
/
opendaylight
/
switchmanager
/
api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
switchmanager
/
Subnet.java
diff --git
a/opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/Subnet.java
b/opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/Subnet.java
index 6cc40193fb18d7ef493ac91f1895b9ae578a65f5..e0842593c8cf25defbabdf078c814afb7ce2cc4d 100644
(file)
--- a/
opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/Subnet.java
+++ b/
opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/Subnet.java
@@
-240,10
+240,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) {