Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve iteration over subnets map by using entrySet instead of keyset.
[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 1deda7c9d0d73ff3250dbcbcb2d08c215f624954..f33fa18e299f62b8680389150c916a28efb06254 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
@@
-38,9
+38,9
@@
public class Subnet implements Cloneable, Serializable {
}
public Subnet(SubnetConfig conf) {
}
public Subnet(SubnetConfig conf) {
- networkAddress = conf.getIP
num
();
+ networkAddress = conf.getIP
Address
();
subnetMaskLength = conf.getIPMaskLen();
subnetMaskLength = conf.getIPMaskLen();
- nodeConnectors = conf.get
Subnet
NodeConnectors();
+ nodeConnectors = conf.getNodeConnectors();
}
public Subnet(Subnet subnet) {
}
public Subnet(Subnet subnet) {
@@
-196,27
+196,36
@@
public class Subnet implements Cloneable, Serializable {
@Override
public boolean equals(Object obj) {
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj)
{
return true;
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
return false;
+ }
Subnet other = (Subnet) obj;
if (networkAddress == null) {
Subnet other = (Subnet) obj;
if (networkAddress == null) {
- if (other.networkAddress != null)
+ if (other.networkAddress != null)
{
return false;
return false;
- } else if (!networkAddress.equals(other.networkAddress))
+ }
+ } else if (!networkAddress.equals(other.networkAddress)) {
return false;
return false;
+ }
if (nodeConnectors == null) {
if (nodeConnectors == null) {
- if (other.nodeConnectors != null)
+ if (other.nodeConnectors != null)
{
return false;
return false;
- } else if (!nodeConnectors.equals(other.nodeConnectors))
+ }
+ } else if (!nodeConnectors.equals(other.nodeConnectors)) {
return false;
return false;
- if (subnetMaskLength != other.subnetMaskLength)
+ }
+ if (subnetMaskLength != other.subnetMaskLength) {
return false;
return false;
- if (vlan != other.vlan)
+ }
+ if (vlan != other.vlan) {
return false;
return false;
+ }
return true;
}
return true;
}
@@
-243,8
+252,9
@@
public class Subnet implements Cloneable, Serializable {
public boolean isMutualExclusive(Subnet otherSubnet) {
if (this.networkAddress.getClass() != otherSubnet.networkAddress
public boolean isMutualExclusive(Subnet otherSubnet) {
if (this.networkAddress.getClass() != otherSubnet.networkAddress
- .getClass())
+ .getClass())
{
return true;
return true;
+ }
if (this.isSubnetOf(otherSubnet.getNetworkAddress())) {
return false;
}
if (this.isSubnetOf(otherSubnet.getNetworkAddress())) {
return false;
}