X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2FBindingDOMNotificationListenerAdapter.java;h=668030e1a6f00572c7862d5a93f019f2d78eeed6;hp=c9a1756435538acfade024a0317f5abedb144c67;hb=9f1f923d51b8fe8df4ec570055c3d39eb79e8af6;hpb=f96b3f1dfbd6e4a220caa84b24134600b17952ca diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationListenerAdapter.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationListenerAdapter.java index c9a1756435..668030e1a6 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationListenerAdapter.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationListenerAdapter.java @@ -38,12 +38,18 @@ class BindingDOMNotificationListenerAdapter implements DOMNotificationListener { @Override public void onNotification(@Nonnull final DOMNotification notification) { - final Notification baNotification = - codec.fromNormalizedNodeNotification(notification.getType(), notification.getBody()); + final Notification baNotification = deserialize(notification); final QName notificationQName = notification.getType().getLastComponent(); getInvoker(notification.getType()).invokeNotification(delegate, notificationQName, baNotification); } + private Notification deserialize(final DOMNotification notification) { + if(notification instanceof LazySerializedDOMNotification) { + return ((LazySerializedDOMNotification) notification).getBindingData(); + } + return codec.fromNormalizedNodeNotification(notification.getType(), notification.getBody()); + } + private NotificationListenerInvoker getInvoker(final SchemaPath type) { return invokers.get(type); }