Satish K
Committed by Ray Milkey

Duplicate Null Check not required

Change-Id: I31e3702b1456b8c5b50bf8e139833bd5f818df6d
......@@ -144,7 +144,6 @@ public class SubnetManager implements SubnetService {
@Override
public boolean updateSubnets(Iterable<Subnet> subnets) {
checkNotNull(subnets, SUBNET_NOT_NULL);
if (subnets != null) {
for (Subnet subnet : subnets) {
if (!subnetStore.containsKey(subnet.id())) {
log.debug("The subnet is not exist whose identifier is {}",
......@@ -160,14 +159,12 @@ public class SubnetManager implements SubnetService {
return false;
}
}
}
return true;
}
@Override
public boolean removeSubnets(Iterable<SubnetId> subnetIds) {
checkNotNull(subnetIds, SUBNET_ID_NULL);
if (subnetIds != null) {
for (SubnetId subnetId : subnetIds) {
subnetStore.remove(subnetId);
if (subnetStore.containsKey(subnetId)) {
......@@ -176,7 +173,6 @@ public class SubnetManager implements SubnetService {
return false;
}
}
}
return true;
}
......