Move createProxy()
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / compat / FunctionalNotificationListenerAdapter.java
index 0d85ef9a5f9aca69fd4be8d070439b9fba8b3bfd..e4795c6d56c83c3d09dd1f5840d42c84483dff90 100644 (file)
@@ -7,7 +7,6 @@
  */
 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;
@@ -15,25 +14,27 @@ import org.opendaylight.controller.sal.binding.api.NotificationListener;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
+@Deprecated
 final class FunctionalNotificationListenerAdapter<N extends Notification> implements DOMNotificationListener {
 
     private final BindingNormalizedNodeSerializer codec;
     private final NotificationListener<N> delegate;
     private final Class<N> type;
 
-    public FunctionalNotificationListenerAdapter(final BindingNormalizedNodeSerializer codec, final Class<N> type, final NotificationListener<N> delegate) {
+    FunctionalNotificationListenerAdapter(final BindingNormalizedNodeSerializer codec, final Class<N> type,
+            final NotificationListener<N> 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());