From f4a3eb460169279a69ce13a86aadf0a5ba99138f Mon Sep 17 00:00:00 2001 From: amalhub Date: Wed, 6 Sep 2017 11:34:05 +0530 Subject: [PATCH] App-mgt store impl refactoring --- .../mgt/api/services/impl/SubscriptionManagementAPIImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java index e5128e1388..5c521487de 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java @@ -45,7 +45,7 @@ public class SubscriptionManagementAPIImpl implements SubscriptionManagementAPI{ @Override public Response installApplication(@ApiParam(name = "installationDetails", value = "The application ID and list" + " the devices/users/roles", required = true) @Valid InstallationDetails installationDetails) { - Object response = null; + Object response; SubscriptionManager subscriptionManager = APIUtil.getSubscriptionManager(); try { String applicationUUTD = installationDetails.getApplicationUUID(); @@ -60,6 +60,7 @@ public class SubscriptionManagementAPIImpl implements SubscriptionManagementAPI{ response = subscriptionManager.installApplicationForRoles(applicationUUTD, roleList); } else { response = "Missing request data!"; + return Response.status(Response.Status.BAD_REQUEST).entity(response).build(); } return Response.status(Response.Status.OK).entity(response).build(); } catch (ApplicationManagementException e) {