X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDelayedDataTreeChangeListenerRegistration.java;h=740aef92b8d38bf61ab8e59316f20397efd4ace0;hb=7526de25301597d670657400b541b10455311fbe;hp=ef26e94ee97f84edd4ea4de2648e0274c0f4df32;hpb=9917911b1a492b5f9fbeef1591569f7fc4a80f68;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DelayedDataTreeChangeListenerRegistration.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DelayedDataTreeChangeListenerRegistration.java index ef26e94ee9..740aef92b8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DelayedDataTreeChangeListenerRegistration.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DelayedDataTreeChangeListenerRegistration.java @@ -8,12 +8,11 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorRef; -import java.util.EventListener; import org.checkerframework.checker.lock.qual.GuardedBy; import org.opendaylight.controller.cluster.datastore.messages.RegisterDataTreeChangeListener; -import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.concepts.Registration; -class DelayedDataTreeChangeListenerRegistration implements ListenerRegistration { +class DelayedDataTreeChangeListenerRegistration implements Registration { private final RegisterDataTreeChangeListener registrationMessage; private final ActorRef registrationActor; @@ -32,17 +31,6 @@ class DelayedDataTreeChangeListenerRegistration impleme } } - @Override - public L getInstance() { - // ObjectRegistration annotates this method as @Nonnull but we could return null if the delegate is not set yet. - // In reality, we do not and should not ever call this method on DelayedDataTreeChangeListenerRegistration - // instances anyway but, since we have to provide an implementation to satisfy the interface, we throw - // UnsupportedOperationException to honor the API contract of not returning null and to avoid a FindBugs error - // for possibly returning null. - throw new UnsupportedOperationException( - "getInstance should not be called on this instance since it could be null"); - } - @Override public synchronized void close() { closed = true;