Repository: cloudstack Updated Branches: refs/heads/4.4-forward 3ce28f447 -> 32a7d5d38
Fixed few coverity issues unused assignments, boxing and unboxing of values etc. Signed-off-by: Koushik Das <kous...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/32a7d5d3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/32a7d5d3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/32a7d5d3 Branch: refs/heads/4.4-forward Commit: 32a7d5d387804374c38ed568e2dcd1e9c543873c Parents: 3ce28f4 Author: Rajani Karuturi <rajanikarut...@gmail.com> Authored: Wed Jun 11 14:36:06 2014 +0530 Committer: Koushik Das <kous...@apache.org> Committed: Thu Jun 12 13:57:57 2014 +0530 ---------------------------------------------------------------------- .../cloud/configuration/ConfigurationManagerImpl.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/32a7d5d3/server/src/com/cloud/configuration/ConfigurationManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index d2f5af3..010ca7a 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -954,9 +954,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati } // Check if the IP range is valid - if (startIp != null || endIp != null) { - checkIpRange(startIp, endIp, cidrAddress, cidrSize); - } + checkIpRange(startIp, endIp, cidrAddress, cidrSize); // Check if the IP range overlaps with the public ip checkOverlapPublicIpRange(zoneId, startIp, endIp); @@ -1016,7 +1014,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati @Override public void doInTransactionWithoutResult(TransactionStatus status) { // Delete private ip addresses for the pod if there are any - List<DataCenterIpAddressVO> privateIps = _privateIpAddressDao.listByPodIdDcId(Long.valueOf(podId), pod.getDataCenterId()); + List<DataCenterIpAddressVO> privateIps = _privateIpAddressDao.listByPodIdDcId(podId, pod.getDataCenterId()); if (!privateIps.isEmpty()) { if (!(_privateIpAddressDao.deleteIpAddressByPod(podId))) { throw new CloudRuntimeException("Failed to cleanup private ip addresses for pod " + podId); @@ -1517,13 +1515,8 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati @ActionEvent(eventType = EventTypes.EVENT_ZONE_DELETE, eventDescription = "deleting zone", async = false) public boolean deleteZone(DeleteZoneCmd cmd) { - Long userId = CallContext.current().getCallingUserId(); final Long zoneId = cmd.getId(); - if (userId == null) { - userId = Long.valueOf(User.UID_SYSTEM); - } - // Make sure the zone exists if (!validZone(zoneId)) { throw new InvalidParameterValueException("A zone with ID: " + zoneId + " does not exist."); @@ -2044,7 +2037,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati } } else { allowNetworkRate = true; - ; } if (cmd.getNetworkRate() != null && !allowNetworkRate) {