X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FDOMNotificationRouterEvent.java;h=47ff2c286958edacf8f6519bc355c5e2ef1c38a3;hp=8aa9f0d503eb1a80135cfd5b813ac22450434a24;hb=3859df9beca8f13f1ff2b2744ed3470a1715bec3;hpb=6cd5778f454ba882d0e15361dfa6a5cd06721d97 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java index 8aa9f0d503..47ff2c2869 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java @@ -7,10 +7,12 @@ */ package org.opendaylight.controller.md.sal.dom.broker.impl; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import com.lmax.disruptor.EventFactory; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import org.opendaylight.controller.md.sal.dom.api.DOMNotification; import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener; @@ -22,6 +24,7 @@ import org.slf4j.LoggerFactory; * A single notification event in the disruptor ringbuffer. These objects are reused, * so they do have mutable state. */ +@Deprecated final class DOMNotificationRouterEvent { private static final Logger LOG = LoggerFactory.getLogger(DOMNotificationRouterEvent.class); public static final EventFactory FACTORY = DOMNotificationRouterEvent::new; @@ -38,8 +41,8 @@ final class DOMNotificationRouterEvent { ListenableFuture initialize(final DOMNotification notification, final Collection> subscribers) { - this.notification = Preconditions.checkNotNull(notification); - this.subscribers = Preconditions.checkNotNull(subscribers); + this.notification = requireNonNull(notification); + this.subscribers = requireNonNull(subscribers); this.future = SettableFuture.create(); return this.future; } @@ -55,6 +58,7 @@ final class DOMNotificationRouterEvent { LOG.trace("Delivery completed"); } + @SuppressFBWarnings(value = "NP_NONNULL_PARAM_VIOLATION", justification = "Void is the only allowed value") void setFuture() { future.set(null); notification = null;