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;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated(forRemoval = true)
public class HeliumNotificationProviderServiceWithInterestListeners extends HeliumNotificationProviderServiceAdapter {
private static final Logger LOG = LoggerFactory.getLogger(
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<SchemaPath> added) {
- final Iterator<ListenerRegistration<NotificationInterestListener>> listeners = interestListeners.iterator();
+ final Iterator<? extends ListenerRegistration<? extends NotificationInterestListener>> listeners =
+ interestListeners.getRegistrations().iterator();
if (listeners.hasNext()) {
final Set<Class<? extends Notification>> baEvent = translate(added);
while (listeners.hasNext()) {
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);
}
}
}
};
}
- private void notifyListener(final NotificationInterestListener listener,
+ private static void notifyListener(final NotificationInterestListener listener,
final Set<Class<? extends Notification>> baEvent) {
for (final Class<? extends Notification> event: baEvent) {
listener.onNotificationSubscribtion(event);
}
@Override
- public void close() throws Exception {
+ public void close() {
super.close();
domListener.close();
}