Hyunsun Moon

Fixed NPE and return 404 error upon unknown app activation request

Change-Id: Ic1b7904bcd873812f6e931c3fcb8dad4e4718364
...@@ -165,7 +165,7 @@ public class ApplicationsWebResource extends AbstractWebResource { ...@@ -165,7 +165,7 @@ public class ApplicationsWebResource extends AbstractWebResource {
165 @Path("{name}/active") 165 @Path("{name}/active")
166 public Response activateApp(@PathParam("name") String name) { 166 public Response activateApp(@PathParam("name") String name) {
167 ApplicationAdminService service = get(ApplicationAdminService.class); 167 ApplicationAdminService service = get(ApplicationAdminService.class);
168 - ApplicationId appId = service.getId(name); 168 + ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND);
169 service.activate(appId); 169 service.activate(appId);
170 return response(service, appId); 170 return response(service, appId);
171 } 171 }
......