Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / compat / AggregatedNotificationListenerRegistration.java
index 151439945ef98ad35b2a56da9a630469684d9b8f..1979b222c8455e30171801ba66eb355bc3238d01 100644 (file)
@@ -7,28 +7,32 @@
  */
 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.yang.binding.Notification;
 
-import com.google.common.base.Preconditions;
-
 /**
  * An aggregated listener registration. This is a result of registering an invoker which can handle multiple
  * interfaces at the same time. In order to support correct delivery, we need to maintain per-type registrations
  * which get squashed if a notification which implements multiple interfaces is encountered.
  *
+ * <p>
  * We take care of that by implementing alternate {@link #hashCode()}/{@link #equals(Object)}, which resolve
  * to the backing aggregator.
  *
  * @param <N> Notification type
  * @param <A> Aggregator type
  */
-abstract class AggregatedNotificationListenerRegistration<N extends Notification, A> extends AbstractNotificationListenerRegistration<N> {
+@Deprecated(forRemoval = true)
+abstract class AggregatedNotificationListenerRegistration<N extends Notification, A>
+        extends AbstractNotificationListenerRegistration<N> {
     private final A aggregator;
 
-    protected AggregatedNotificationListenerRegistration(final Class<? extends Notification> type, final NotificationListener<N> listener, final A aggregator) {
+    protected AggregatedNotificationListenerRegistration(final Class<? extends Notification> type,
+            final NotificationListener<N> listener, final A aggregator) {
         super(type, listener);
-        this.aggregator = Preconditions.checkNotNull(aggregator);
+        this.aggregator = requireNonNull(aggregator);
     }
 
     protected A getAggregator() {