diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java index 36e1a25c582..0bde79bbd7b 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java @@ -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() { diff --git a/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java index f478c9bc8ee..c0ad3451040 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java @@ -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() { diff --git a/api/test/org/apache/cloudstack/api/command/test/ListCfgCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/ListCfgCmdTest.java index 6b56591d1f1..7911943c33b 100644 --- a/api/test/org/apache/cloudstack/api/command/test/ListCfgCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/ListCfgCmdTest.java @@ -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() { diff --git a/api/test/org/apache/cloudstack/api/command/test/UpdateCfgCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/UpdateCfgCmdTest.java index a07608a29fc..63c4a032435 100644 --- a/api/test/org/apache/cloudstack/api/command/test/UpdateCfgCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/UpdateCfgCmdTest.java @@ -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() { diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 1f71c0f2691..84fe50a6783 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -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); } diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index deb24245ebd..e089cd14ecb 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -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); }