BUG-7506: use common DocumentBuilderFactory
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / NotificationListenerBean.java
index bdef13f59c88f3f3a2bfe8bb225f238e520720db..ccf6216d3da89e8a037567ccabcdc246415cff40 100644 (file)
@@ -32,6 +32,7 @@ public class NotificationListenerBean {
     public void setNotificationService(NotificationService notificationService) {
         this.notificationService = notificationService;
     }
+
     public void setNotificationListener(NotificationListener notificationListener) {
         this.notificationListener = notificationListener;
     }
@@ -40,7 +41,6 @@ public class NotificationListenerBean {
         this.bundle = bundle;
     }
 
-    @SuppressWarnings({ })
     public void init() {
         LOG.debug("{}: init - registering NotificationListener {}", bundle.getSymbolicName(), notificationListener);
 
@@ -48,8 +48,11 @@ public class NotificationListenerBean {
     }
 
     public void destroy() {
-        if(registration != null) {
+        if (registration != null) {
+            LOG.debug("{}: destroy - closing ListenerRegistration {}", bundle.getSymbolicName(), notificationListener);
             registration.close();
+        } else {
+            LOG.debug("{}: destroy - listener was not registered", bundle.getSymbolicName());
         }
     }
 }