Fix modernization issues
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / compat / AbstractNotificationListenerRegistration.java
index e327e6f23657ed5d24ec25eb73336d58b7e69bad..4d53384c8e4e80adfa3818de43cfeff41169027f 100644 (file)
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.controller.md.sal.binding.compat;
 
-import com.google.common.base.Preconditions;
+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;
@@ -17,6 +18,7 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  *
  * @param <T> Notification type
  */
+@Deprecated
 abstract class AbstractNotificationListenerRegistration<T extends Notification>
         extends AbstractListenerRegistration<NotificationListener<T>> implements NotificationListenerRegistration<T> {
     private final Class<? extends Notification> type;
@@ -24,7 +26,7 @@ abstract class AbstractNotificationListenerRegistration<T extends Notification>
     protected AbstractNotificationListenerRegistration(final Class<? extends Notification> type,
             final NotificationListener<T> listener) {
         super(listener);
-        this.type = Preconditions.checkNotNull(type);
+        this.type = requireNonNull(type);
     }
 
     @Override