Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
blueprint: final parameters
[controller.git]
/
opendaylight
/
blueprint
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
blueprint
/
ext
/
NotificationListenerBean.java
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 bdef13f59c88f3f3a2bfe8bb225f238e520720db..3a2a0b837b4e87d27427427a91542d130e7f17a4 100644
(file)
--- 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;
private NotificationListener notificationListener;
private ListenerRegistration<?> registration;
- public void setNotificationService(NotificationService notificationService) {
+ public void setNotificationService(
final
NotificationService notificationService) {
this.notificationService = notificationService;
}
this.notificationService = notificationService;
}
- public void setNotificationListener(NotificationListener notificationListener) {
+
+ public void setNotificationListener(final NotificationListener notificationListener) {
this.notificationListener = notificationListener;
}
this.notificationListener = notificationListener;
}
- public void setBundle(Bundle bundle) {
+ public void setBundle(
final
Bundle bundle) {
this.bundle = bundle;
}
this.bundle = bundle;
}
- @SuppressWarnings({ })
public void init() {
LOG.debug("{}: init - registering NotificationListener {}", bundle.getSymbolicName(), notificationListener);
public void init() {
LOG.debug("{}: init - registering NotificationListener {}", bundle.getSymbolicName(), notificationListener);
@@
-48,8
+48,11
@@
public class NotificationListenerBean {
}
public void destroy() {
}
public void destroy() {
- if(registration != null) {
+ if (registration != null) {
+ LOG.debug("{}: destroy - closing ListenerRegistration {}", bundle.getSymbolicName(), notificationListener);
registration.close();
registration.close();
+ } else {
+ LOG.debug("{}: destroy - listener was not registered", bundle.getSymbolicName());
}
}
}
}
}
}