Skip to content

Commit dae442e

Browse files
karuturisebgoa
authored andcommitted
COVERITY: Fixed few coverity issues unused assignments, boxing and unboxing of values etc.
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
1 parent 85bed5f commit dae442e

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

‎server/src/com/cloud/configuration/ConfigurationManagerImpl.java‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -948,9 +948,7 @@ private void checkPodAttributes(long podId, String podName, long zoneId, String
948948
}
949949

950950
// Check if the IP range is valid
951-
if (startIp != null || endIp != null) {
952-
checkIpRange(startIp, endIp, cidrAddress, cidrSize);
953-
}
951+
checkIpRange(startIp, endIp, cidrAddress, cidrSize);
954952

955953
// Check if the IP range overlaps with the public ip
956954
checkOverlapPublicIpRange(zoneId, startIp, endIp);
@@ -1011,8 +1009,8 @@ public boolean deletePod(DeletePodCmd cmd) {
10111009
@Override
10121010
public void doInTransactionWithoutResult(TransactionStatus status) {
10131011
// Delete private ip addresses for the pod if there are any
1014-
List<DataCenterIpAddressVO> privateIps = _privateIpAddressDao.listByPodIdDcId(Long.valueOf(podId),
1015-
pod.getDataCenterId());
1012+
List<DataCenterIpAddressVO> privateIps = _privateIpAddressDao.listByPodIdDcId(podId, pod.getDataCenterId());
1013+
10161014
if (!privateIps.isEmpty()) {
10171015
if (!(_privateIpAddressDao.deleteIpAddressByPod(podId))) {
10181016
throw new CloudRuntimeException("Failed to cleanup private ip addresses for pod " + podId);
@@ -1534,13 +1532,8 @@ private void checkOverlapPrivateIpRange(Long zoneId, String startIp, String endI
15341532
@ActionEvent(eventType = EventTypes.EVENT_ZONE_DELETE, eventDescription = "deleting zone", async = false)
15351533
public boolean deleteZone(DeleteZoneCmd cmd) {
15361534

1537-
Long userId = CallContext.current().getCallingUserId();
15381535
final Long zoneId = cmd.getId();
15391536

1540-
if (userId == null) {
1541-
userId = Long.valueOf(User.UID_SYSTEM);
1542-
}
1543-
15441537
// Make sure the zone exists
15451538
if (!validZone(zoneId)) {
15461539
throw new InvalidParameterValueException("A zone with ID: " + zoneId + " does not exist.");
@@ -2083,7 +2076,6 @@ public ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd) {
20832076
}
20842077
} else {
20852078
allowNetworkRate = true;
2086-
;
20872079
}
20882080

20892081
if (cmd.getNetworkRate() != null && !allowNetworkRate) {

0 commit comments

Comments
 (0)