X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2FActionRegistry.java;h=b90bad26f5a511e1a3662905852627f860dd42d4;hp=73a471c5b2f9c6daac9a496c57097231b5f48b88;hb=refs%2Fchanges%2F01%2F83801%2F24;hpb=927bce5688e4b9d33d3e5e9b769d8a0dba5ccdd4 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistry.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistry.java index 73a471c5b2..b90bad26f5 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistry.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistry.java @@ -7,11 +7,12 @@ */ package org.opendaylight.controller.remote.rpc.registry; +import static java.util.Objects.requireNonNull; + import akka.actor.ActorRef; import akka.actor.Address; import akka.actor.Props; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -41,7 +42,7 @@ public class ActionRegistry extends BucketStoreActor { public ActionRegistry(final RemoteOpsProviderConfig config, final ActorRef rpcInvoker, final ActorRef rpcRegistrar) { super(config, config.getRpcRegistryPersistenceId(), new ActionRoutingTable(rpcInvoker, ImmutableSet.of())); - this.rpcRegistrar = Preconditions.checkNotNull(rpcRegistrar); + this.rpcRegistrar = requireNonNull(rpcRegistrar); this.mxBean = new RemoteActionRegistryMXBeanImpl(new BucketStoreAccess(self(), getContext().dispatcher(), config.getAskDuration()), config.getAskDuration()); } @@ -60,7 +61,7 @@ public class ActionRegistry extends BucketStoreActor { } @Override - public void postStop() { + public void postStop() throws Exception { super.postStop(); this.mxBean.unregister(); } @@ -111,7 +112,7 @@ public class ActionRegistry extends BucketStoreActor { @VisibleForTesting public RemoteActionEndpoint(final ActorRef router, final Collection actions) { - this.router = Preconditions.checkNotNull(router); + this.router = requireNonNull(router); this.actions = ImmutableSet.copyOf(actions); }