X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FFunctionalNotificationListenerAdapter.java;h=712d02517a8b068576771978106ce5aa9a433876;hb=refs%2Fchanges%2F11%2F80211%2F6;hp=94c2197438999400bf36312c63ced19ca864ba81;hpb=954e4ad11529b9704d55e51abf33df4e40d5fb82;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/FunctionalNotificationListenerAdapter.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/FunctionalNotificationListenerAdapter.java index 94c2197438..712d02517a 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/FunctionalNotificationListenerAdapter.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/FunctionalNotificationListenerAdapter.java @@ -7,12 +7,11 @@ */ package org.opendaylight.controller.md.sal.binding.compat; -import javax.annotation.Nonnull; import org.opendaylight.controller.md.sal.binding.impl.LazySerializedDOMNotification; import org.opendaylight.controller.md.sal.dom.api.DOMNotification; import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener; import org.opendaylight.controller.sal.binding.api.NotificationListener; -import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; +import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.Notification; final class FunctionalNotificationListenerAdapter implements DOMNotificationListener { @@ -21,19 +20,20 @@ final class FunctionalNotificationListenerAdapter implem private final NotificationListener delegate; private final Class type; - public FunctionalNotificationListenerAdapter(final BindingNormalizedNodeSerializer codec, final Class type, final NotificationListener delegate) { + FunctionalNotificationListenerAdapter(final BindingNormalizedNodeSerializer codec, final Class type, + final NotificationListener delegate) { this.codec = codec; this.type = type; this.delegate = delegate; } @Override - public void onNotification(@Nonnull final DOMNotification notification) { - delegate.onNotification( type.cast(deserialize(notification))); + public void onNotification(final DOMNotification notification) { + delegate.onNotification(type.cast(deserialize(notification))); } private Notification deserialize(final DOMNotification notification) { - if(notification instanceof LazySerializedDOMNotification) { + if (notification instanceof LazySerializedDOMNotification) { return ((LazySerializedDOMNotification) notification).getBindingData(); } return codec.fromNormalizedNodeNotification(notification.getType(), notification.getBody());