blueprint: final parameters
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / NotificationListenerBean.java
index bdef13f59c88f3f3a2bfe8bb225f238e520720db..3a2a0b837b4e87d27427427a91542d130e7f17a4 100644 (file)
@@ -29,18 +29,18 @@ public class NotificationListenerBean {
     private NotificationListener notificationListener;
     private ListenerRegistration<?> registration;
 
-    public void setNotificationService(NotificationService notificationService) {
+    public void setNotificationService(final NotificationService notificationService) {
         this.notificationService = notificationService;
     }
-    public void setNotificationListener(NotificationListener notificationListener) {
+
+    public void setNotificationListener(final NotificationListener notificationListener) {
         this.notificationListener = notificationListener;
     }
 
-    public void setBundle(Bundle bundle) {
+    public void setBundle(final Bundle bundle) {
         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());
         }
     }
 }