findbugs: null check for gateway and netmask instead of gateway twice(cherry picked from commit d30ddf6d59)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
This commit is contained in:
Daan Hoogland 2014-01-26 15:11:56 +01:00 committed by Animesh Chaturvedi
parent 220a2a1a0e
commit 85868d81fb
1 changed files with 3 additions and 2 deletions

View File

@ -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;
@ -2754,7 +2755,7 @@ ConfigurationManagerImpl extends ManagerBase implements ConfigurationManager, Co
}
}
return NetUtils.supersetOrSubset.neitherSubetNorSuperset;
} else if (newVlanGateway == null || newVlanGateway == null) {
} else if (newVlanGateway == null || newVlanNetmask == null) {
throw new InvalidParameterValueException(
"either both netmask and gateway should be passed or both should me omited.");
} else {