commit | e6213cf013508468a4c149da06585357aec8b8b0 | [log] [tgz] |
---|---|---|
author | Jayasree Ghosh <jghosh@partner.ciena.com> | Wed Sep 28 07:55:55 2016 +0530 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Oct 06 21:41:08 2016 +0000 |
tree | 24dc6cc1784b9abfc4f58b98642b3184d79069a4 | |
parent | 1ce2dd113d4a63dad5b606c3a401071ef6a0c705 [diff] |
Fix For ONOS-5396:Causing NPE:for REST API- GET /applications/{name} Change-Id: I652f4620a741f64bc71f2555ad801eb00e7c951f
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java index 6163af4..df12dae 100644 --- a/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java +++ b/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java
@@ -78,7 +78,7 @@ @Path("{name}") public Response getApp(@PathParam("name") String name) { ApplicationAdminService service = get(ApplicationAdminService.class); - ApplicationId appId = service.getId(name); + ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND); return response(service, appId); }