Satish K
Committed by Gerrit Code Review

Duplicate Null Check not required

Change-Id: Ifd7a6678674f9858e33c43d8f210e42964859b3e
......@@ -202,7 +202,6 @@ public class FloatingIpManager implements FloatingIpService {
public boolean updateFloatingIps(Collection<FloatingIp> floatingIps) {
checkNotNull(floatingIps, FLOATINGIP_NOT_NULL);
boolean result = true;
if (floatingIps != null) {
for (FloatingIp floatingIp : floatingIps) {
verifyFloatingIpData(floatingIp);
if (floatingIp.portId() != null) {
......@@ -213,8 +212,7 @@ public class FloatingIpManager implements FloatingIpService {
result = false;
}
} else {
FloatingIp oldFloatingIp = floatingIpStore.get(floatingIp
.id());
FloatingIp oldFloatingIp = floatingIpStore.get(floatingIp.id());
if (oldFloatingIp != null) {
floatingIpStore.remove(floatingIp.id(), oldFloatingIp);
if (floatingIpStore.containsKey(floatingIp.id())) {
......@@ -225,7 +223,6 @@ public class FloatingIpManager implements FloatingIpService {
}
}
}
}
return result;
}
......@@ -233,7 +230,6 @@ public class FloatingIpManager implements FloatingIpService {
public boolean removeFloatingIps(Collection<FloatingIpId> floatingIpIds) {
checkNotNull(floatingIpIds, FLOATINGIP_ID_NOT_NULL);
boolean result = true;
if (floatingIpIds != null) {
for (FloatingIpId floatingIpId : floatingIpIds) {
if (!floatingIpStore.containsKey(floatingIpId)) {
log.debug("The floatingIp is not exist whose identifier is {}",
......@@ -249,7 +245,6 @@ public class FloatingIpManager implements FloatingIpService {
result = false;
}
}
}
return result;
}
......