Deprecate old MD-SAL APIs for removal
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / compat / AbstractNotificationListenerRegistration.java
index 540c26131621477ef00f95d0055db2576ce7550c..1cfe9c459196efcf62f220d16256459b1eb7b374 100644 (file)
@@ -7,23 +7,26 @@
  */
 package org.opendaylight.controller.md.sal.binding.compat;
 
+import static java.util.Objects.requireNonNull;
+
 import org.opendaylight.controller.sal.binding.api.NotificationListener;
 import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Abstract implementation of {@link NotificationListenerRegistration}.
  *
  * @param <T> Notification type
  */
-abstract class AbstractNotificationListenerRegistration<T extends Notification> extends AbstractListenerRegistration<NotificationListener<T>> implements NotificationListenerRegistration<T> {
+@Deprecated(forRemoval = true)
+abstract class AbstractNotificationListenerRegistration<T extends Notification>
+        extends AbstractListenerRegistration<NotificationListener<T>> implements NotificationListenerRegistration<T> {
     private final Class<? extends Notification> type;
 
-    protected AbstractNotificationListenerRegistration(final Class<? extends Notification> type, final NotificationListener<T> listener) {
+    protected AbstractNotificationListenerRegistration(final Class<? extends Notification> type,
+            final NotificationListener<T> listener) {
         super(listener);
-        this.type = Preconditions.checkNotNull(type);
+        this.type = requireNonNull(type);
     }
 
     @Override