@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();
}