Fix For ONOS-5396:Causing NPE:for REST API- GET /applications/{name}
Change-Id: I652f4620a741f64bc71f2555ad801eb00e7c951f
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -78,7 +78,7 @@ public class ApplicationsWebResource extends AbstractWebResource { | ... | @@ -78,7 +78,7 @@ public class ApplicationsWebResource extends AbstractWebResource { |
| 78 | @Path("{name}") | 78 | @Path("{name}") |
| 79 | public Response getApp(@PathParam("name") String name) { | 79 | public Response getApp(@PathParam("name") String name) { |
| 80 | ApplicationAdminService service = get(ApplicationAdminService.class); | 80 | ApplicationAdminService service = get(ApplicationAdminService.class); |
| 81 | - ApplicationId appId = service.getId(name); | 81 | + ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND); |
| 82 | return response(service, appId); | 82 | return response(service, appId); |
| 83 | } | 83 | } |
| 84 | 84 | ... | ... |
-
Please register or login to post a comment