mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed few issues reproted by coverity.
This commit is contained in:
parent
fc20023411
commit
433ec7c856
@ -3251,11 +3251,11 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
|
||||
if ((accountName != null) && (domainId != null)) {
|
||||
vlanOwner = _accountDao.findActiveAccount(accountName, domainId);
|
||||
if (vlanOwner == null) {
|
||||
throw new InvalidParameterValueException("Unable to find account by name " + accountName);
|
||||
} else if (vlanOwner.getId() == Account.ACCOUNT_ID_SYSTEM) {
|
||||
throw new InvalidParameterValueException("Please specify a valid account. Cannot dedicate IP range to system account");
|
||||
}
|
||||
}
|
||||
if (vlanOwner == null) {
|
||||
throw new InvalidParameterValueException("Unable to find account by name " + accountName);
|
||||
} else if (vlanOwner.getId() == Account.ACCOUNT_ID_SYSTEM) {
|
||||
throw new InvalidParameterValueException("Please specify a valid account. Cannot dedicate IP range to system account");
|
||||
}
|
||||
|
||||
// Check if range is valid
|
||||
|
||||
@ -3014,9 +3014,9 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
|
||||
|
||||
if ((accountName != null) && (domainId != null)) {
|
||||
vlanOwner = _accountDao.findActiveAccount(accountName, domainId);
|
||||
if (vlanOwner == null) {
|
||||
throw new InvalidParameterValueException("Unable to find account by name " + accountName);
|
||||
}
|
||||
}
|
||||
if (vlanOwner == null) {
|
||||
throw new InvalidParameterValueException("Unable to find account by name " + accountName);
|
||||
}
|
||||
vlanOwnerId = vlanOwner.getAccountId();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user