commit | cab2869c3115bcbe11f310c8b7dfdf44c76c6e5b | [log] [tgz] |
---|---|---|
author | Arjun E K <arjun.k02@infosys.com> | Fri Feb 08 07:47:23 2019 -0500 |
committer | Thomas Vachuska <tom@opennetworking.org> | Tue Feb 12 18:03:10 2019 +0000 |
tree | d8c7f6bec1260c3b0843712cceeea47ff8e3282c | |
parent | 972ee840811fa5468385b7976f1024c0ba224801 [diff] |
fix for service not found error Change-Id: I92091b5932e2ecefb074861085015393b8d1b61d
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/AuditFilter.java b/web/api/src/main/java/org/onosproject/rest/resources/AuditFilter.java index 81c4f42..40749f3 100644 --- a/web/api/src/main/java/org/onosproject/rest/resources/AuditFilter.java +++ b/web/api/src/main/java/org/onosproject/rest/resources/AuditFilter.java
@@ -85,7 +85,12 @@ } private AuditService auditService() { - AuditService auditService = disableForTests ? null : services.get(AuditService.class); + AuditService auditService = null; + try { + auditService = disableForTests ? null : services.get(AuditService.class); + } catch (org.onlab.osgi.ServiceNotFoundException e) { + return null; + } return auditService != null && auditService.isAuditing() ? auditService : null; } }