X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fblueprint%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fblueprint%2Fext%2FNotificationListenerBean.java;h=3a2a0b837b4e87d27427427a91542d130e7f17a4;hb=d8be13e36b4a5fca3155e7ab3e840ba9ab5a75b1;hp=bdef13f59c88f3f3a2bfe8bb225f238e520720db;hpb=33767a11f3aec774ec2ac8c13cc18b0ff0da9c10;p=controller.git diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/NotificationListenerBean.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/NotificationListenerBean.java index bdef13f59c..3a2a0b837b 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/NotificationListenerBean.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/NotificationListenerBean.java @@ -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()); } } }