X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FHeliumNotificationProviderServiceWithInterestListeners.java;h=88ba4ea482865178bdcd2b0409f86603d78ccd7a;hb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0;hp=ee64e470806f6f7d672cb0f9173efeae24a64d96;hpb=70cd4b01dd47a66c5591e6f8151430bb9c274a09;p=controller.git 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 ee64e47080..88ba4ea482 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 @@ -8,6 +8,7 @@ package org.opendaylight.controller.md.sal.binding.compat; import com.google.common.collect.Sets; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collections; import java.util.Iterator; import java.util.Set; @@ -27,6 +28,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Deprecated(forRemoval = true) public class HeliumNotificationProviderServiceWithInterestListeners extends HeliumNotificationProviderServiceAdapter { private static final Logger LOG = LoggerFactory.getLogger( @@ -58,9 +60,12 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli return codec.getNotificationClasses(added); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") @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 +73,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 +95,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 +119,7 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli } @Override - public void close() throws Exception { + public void close() { super.close(); domListener.close(); }