mirror of https://github.com/apache/cloudstack.git
fix null pointer dereference in cloud-server
This commit is contained in:
parent
35de50debf
commit
3ed9e42dd2
|
|
@ -315,9 +315,10 @@ public class StorageNetworkManagerImpl extends ManagerBase implements StorageNet
|
|||
List<StorageNetworkIpRangeVO> ranges = _sNwIpRangeDao.listByPodId(podId);
|
||||
for (StorageNetworkIpRangeVO r : ranges) {
|
||||
try {
|
||||
r = _sNwIpRangeDao.acquireInLockTable(r.getId());
|
||||
Long rangeId = r.getId();
|
||||
r = _sNwIpRangeDao.acquireInLockTable(rangeId);
|
||||
if (r == null) {
|
||||
String msg = "Unable to acquire lock on storage network ip range id=" + r.getId() + ", delete failed";
|
||||
String msg = "Unable to acquire lock on storage network ip range id=" + rangeId + ", delete failed";
|
||||
s_logger.warn(msg);
|
||||
throw new CloudRuntimeException(msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
|
|||
long gslbRuleId = assignToGslbCmd.getGlobalLoadBalancerRuleId();
|
||||
GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId);
|
||||
if (gslbRule == null) {
|
||||
throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRule.getUuid());
|
||||
throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRuleId);
|
||||
}
|
||||
|
||||
_accountMgr.checkAccess(caller, SecurityChecker.AccessType.ModifyEntry, true, gslbRule);
|
||||
|
|
@ -282,7 +282,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
|
|||
long gslbRuleId = removeFromGslbCmd.getGlobalLoadBalancerRuleId();
|
||||
GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId);
|
||||
if (gslbRule == null) {
|
||||
throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRule.getUuid());
|
||||
throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRuleId);
|
||||
}
|
||||
|
||||
_accountMgr.checkAccess(caller, SecurityChecker.AccessType.ModifyEntry, true, gslbRule);
|
||||
|
|
|
|||
Loading…
Reference in New Issue