mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
findbugs: null check for gateway and netmask instead of gateway
twice(cherry picked from commit d30ddf6d59732fa30855811e7fe0aa639ee3849a)
This commit is contained in:
parent
a71871d11c
commit
53feecaa76
@ -36,6 +36,8 @@ import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.SecurityChecker;
|
||||
import org.apache.cloudstack.affinity.AffinityGroup;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupService;
|
||||
@ -83,7 +85,6 @@ import org.apache.cloudstack.region.dao.RegionDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.alert.AlertManager;
|
||||
import com.cloud.api.ApiDBUtils;
|
||||
@ -2640,8 +2641,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
}
|
||||
}
|
||||
return NetUtils.supersetOrSubset.neitherSubetNorSuperset;
|
||||
} else if (newVlanGateway == null || newVlanGateway == null) {
|
||||
throw new InvalidParameterValueException("either both netmask and gateway should be passed or both should me omited.");
|
||||
} else if (newVlanGateway == null || newVlanNetmask == null) {
|
||||
throw new InvalidParameterValueException(
|
||||
"either both netmask and gateway should be passed or both should me omited.");
|
||||
} else {
|
||||
if (!NetUtils.sameSubnet(startIP, newVlanGateway, newVlanNetmask)) {
|
||||
throw new InvalidParameterValueException("The start ip and gateway do not belong to the same subnet");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user