X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fsharding%2FRoleChangeListenerActor.java;h=f8e19180ddd13e185ad0654b98a08ee12b06fb98;hp=38b69e720aeadf4597b8fbe7dfb1571bd792505a;hb=da174be7e22b16d4ac80cccefdc52b209b700745;hpb=d69af1f79ae4630be8c4d65b98096aa27b1665b6 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/RoleChangeListenerActor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/RoleChangeListenerActor.java index 38b69e720a..f8e19180dd 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/RoleChangeListenerActor.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/RoleChangeListenerActor.java @@ -5,12 +5,12 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.sharding; +import static java.util.Objects.requireNonNull; + import akka.actor.ActorRef; import akka.actor.Props; -import com.google.common.base.Preconditions; import org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor; import org.opendaylight.controller.cluster.dom.api.LeaderLocation; import org.opendaylight.controller.cluster.dom.api.LeaderLocationListener; @@ -25,13 +25,14 @@ import org.opendaylight.controller.cluster.notifications.RoleChangeNotification; * {@link LeaderLocationListener#onLeaderLocationChanged(LeaderLocation)} * events. */ -public class RoleChangeListenerActor extends AbstractUntypedActor { +@Deprecated(forRemoval = true) +public final class RoleChangeListenerActor extends AbstractUntypedActor { private final LeaderLocationListener leaderLocationListener; private final ActorRef roleChangeNotifier; private RoleChangeListenerActor(final ActorRef roleChangeNotifier, final LeaderLocationListener listener) { - this.roleChangeNotifier = Preconditions.checkNotNull(roleChangeNotifier); - this.leaderLocationListener = Preconditions.checkNotNull(listener); + this.roleChangeNotifier = requireNonNull(roleChangeNotifier); + this.leaderLocationListener = requireNonNull(listener); } @Override @@ -41,7 +42,7 @@ public class RoleChangeListenerActor extends AbstractUntypedActor { } @Override - protected void handleReceive(final Object message) throws Exception { + protected void handleReceive(final Object message) { if (message instanceof RoleChangeNotification) { ignoreMessage(message); } else if (message instanceof LeaderStateChanged) {