From 31996a6707d75a5f87f7d8c89f563af74e32fe70 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Thu, 24 Aug 2017 13:08:49 +0200 Subject: NamingContext.getNameIfPresent should not fail if name is missing Also makes InterfaceChangeNotificationProducer notification translation code more defensive. The issue was revealed by HC2VPP-216 and HC2VPP-220. Change-Id: I20792a51743ae621d86c1b9066d680bc2303ed82 Signed-off-by: Marek Gradzki --- .../v3po/notification/InterfaceChangeNotificationProducer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'v3po') diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java index e971db2ee..44da8279c 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java @@ -79,7 +79,13 @@ final class InterfaceChangeNotificationProducer implements ManagedNotificationPr swInterfaceEventNotification -> { LOG.trace("Interface notification received: {}", swInterfaceEventNotification); // TODO HONEYCOMB-166 this should be lazy - collector.onNotification(transformNotification(swInterfaceEventNotification)); + try { + collector.onNotification(transformNotification(swInterfaceEventNotification)); + } catch (Exception e) { + // There is no need to propagate exception to jvpp rx thread in case of unexpected failures. + // We can't do much about it, so lets log the exception. + LOG.warn("Failed to process interface notification {}", swInterfaceEventNotification, e); + } } ); } -- cgit 1.2.3-korg