return;
}
for (OWLOntologyChangeListener listener : new ArrayList<>(
listenerMap.keySet())) {
assert listener != null;
OWLOntologyChangeBroadcastStrategy strategy = listenerMap
.get(listener);
if (strategy == null) {
// This listener may have been removed during the broadcast of
// the changes, so when we attempt to retrieve it from the map
// it isn't there (because we iterate over a copy).
continue;
}
try {
// Handle exceptions on a per listener basis. If we have
// badly behaving listeners, we don't want one listener
// to prevent the other listeners from receiving events.
strategy.broadcastChanges(listener, changes);
} catch (Exception e) {
LOGGER.warn("BADLY BEHAVING LISTENER: {} has been removed",
e.getMessage(), e);
listenerMap.remove(listener);
}