Improve OSGiDOMSchemaService printouts
[mdsal.git] / dom / mdsal-dom-schema-osgi / src / main / java / org / opendaylight / mdsal / dom / schema / osgi / impl / OSGiDOMSchemaService.java
index d55f6a2f123e93319f07c25472c756a3f787029e..83e237cddd6f484a7da55a8165a95a0b7137090c 100644 (file)
@@ -76,7 +76,7 @@ public final class OSGiDOMSchemaService implements DOMSchemaService, DOMSchemaSe
         final var previous = currentSnapshot.getAndSet(snapshot);
         LOG.debug("Snapshot updated from {} to {}", previous, snapshot);
 
-        listeners.forEach(listener -> notifyListener(modelContext, listener));
+        listeners.forEach(listener -> listener.onModelContextUpdated(modelContext));
     }
 
     void unbindSnapshot(final OSGiModuleInfoSnapshot oldContext) {
@@ -124,13 +124,4 @@ public final class OSGiDOMSchemaService implements DOMSchemaService, DOMSchemaSe
         }
     }
 
-    @SuppressWarnings("checkstyle:illegalCatch")
-    private static void notifyListener(final @NonNull EffectiveModelContext modelContext,
-            final ModelContextListener listener) {
-        try {
-            listener.onModelContextUpdated(modelContext);
-        } catch (RuntimeException e) {
-            LOG.warn("Failed to notify listener {}", listener, e);
-        }
-    }
 }