Fixed few issues reproted by coverity.

This commit is contained in:
Likitha Shetty 2014-08-25 16:11:11 +05:30
parent fc20023411
commit 433ec7c856
2 changed files with 8 additions and 8 deletions

View File

@ -3251,12 +3251,12 @@ 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");
}
}
// Check if range is valid
VlanVO vlan = _vlanDao.findById(vlanDbId);

View File

@ -3014,10 +3014,10 @@ 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);
}
}
vlanOwnerId = vlanOwner.getAccountId();
// Verify physical network isolation type is VLAN