X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FHeliumNotificationProviderServiceWithInterestListeners.java;h=4dd35211cef1db296f537e0504bc6c9f72eaeecb;hp=6181b0edc4c2af367407c3f6da04f6c0196931ee;hb=079163ec73e4304ebe9b6f9076f78e22e2d0e3a5;hpb=03c13bd8a8bb89a729d739eb2fcd501a4dfa5439 diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java index 6181b0edc4..4dd35211ce 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java @@ -18,11 +18,11 @@ import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService; import org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListener; import org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry; import org.opendaylight.controller.sal.binding.api.NotificationListener; +import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections; import org.opendaylight.yangtools.concepts.AbstractListenerRegistration; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.util.ListenerRegistry; import org.opendaylight.yangtools.yang.binding.Notification; -import org.opendaylight.yangtools.yang.binding.util.BindingReflections; import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,7 +60,8 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli @SuppressWarnings("checkstyle:IllegalCatch") private void notifyAllListeners(final Set added) { - final Iterator> listeners = interestListeners.iterator(); + final Iterator> listeners = + interestListeners.getRegistrations().iterator(); if (listeners.hasNext()) { final Set> baEvent = translate(added); while (listeners.hasNext()) { @@ -68,7 +69,7 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli try { notifyListener(listenerRef, baEvent); } catch (RuntimeException e) { - LOG.warn("Unhandled exception during invoking listener {}", e, listenerRef); + LOG.warn("Unhandled exception during invoking listener {}", listenerRef, e); } } } @@ -90,7 +91,7 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli }; } - private void notifyListener(final NotificationInterestListener listener, + private static void notifyListener(final NotificationInterestListener listener, final Set> baEvent) { for (final Class event: baEvent) { listener.onNotificationSubscribtion(event); @@ -114,7 +115,7 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli } @Override - public void close() throws Exception { + public void close() { super.close(); domListener.close(); }