CLOUDSTACK-7706: Coverity defects

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
Harikrishna Patnala 2014-11-11 15:00:42 +05:30 committed by Santhosh Edukulla
parent 5759857ffc
commit edf1047a20
6 changed files with 4 additions and 17 deletions

View File

@ -167,15 +167,15 @@ public class CreateServiceOfferingCmd extends BaseCmd {
}
public Boolean getOfferHa() {
return offerHa == null ? false : offerHa;
return offerHa == null ? Boolean.FALSE : offerHa;
}
public Boolean GetLimitCpuUse() {
return limitCpuUse == null ? false : limitCpuUse;
return limitCpuUse == null ? Boolean.FALSE : limitCpuUse;
}
public Boolean getVolatileVm() {
return isVolatile == null ? false : isVolatile;
return isVolatile == null ? Boolean.FALSE : isVolatile;
}
public String getStorageType() {

View File

@ -227,7 +227,7 @@ public class RegisterTemplateCmd extends BaseCmd {
}
public Boolean isDynamicallyScalable() {
return isDynamicallyScalable == null ? false : isDynamicallyScalable;
return isDynamicallyScalable == null ? Boolean.FALSE : isDynamicallyScalable;
}
public Boolean isRoutingType() {

View File

@ -43,9 +43,6 @@ public class ListCfgCmdTest extends TestCase {
private ManagementService mgr;
private ResponseGenerator responseGenerator;
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Override
@Before
public void setUp() {

View File

@ -40,9 +40,6 @@ public class UpdateCfgCmdTest extends TestCase {
private ConfigurationService configService;
private ResponseGenerator responseGenerator;
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Override
@Before
public void setUp() {

View File

@ -1950,10 +1950,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
DomainVO domainVO = null;
if (userId == null) {
userId = User.UID_SYSTEM;
}
if (domainId != null) {
domainVO = _domainDao.findById(domainId);
}

View File

@ -1696,9 +1696,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
if (scope != null && !scope.isEmpty()) {
// getting the list of parameters at requested scope
if (id == null) {
throw new InvalidParameterValueException("Invalid id null, id is needed corresponding to the scope");
}
sc.addAnd("scope", SearchCriteria.Op.EQ, scope);
}