X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fsharding%2FPrefixedShardConfigUpdateHandler.java;h=d7d75c24754c02b0f518f58fdb0ec754fdcc3bf8;hb=14c92df74247c884a43c5aaea2f154992b0ec798;hp=1e66728aa4272f39439432c619cfd888faa2714c;hpb=3dc48592696e6a4535c0e125c1e23dbc62bc9091;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigUpdateHandler.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigUpdateHandler.java index 1e66728aa4..d7d75c2475 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigUpdateHandler.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigUpdateHandler.java @@ -5,21 +5,19 @@ * 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 akka.actor.ActorRef.noSender; +import static java.util.Objects.requireNonNull; import static org.opendaylight.controller.cluster.datastore.utils.ClusterUtils.SHARD_PREFIX_QNAME; import static org.opendaylight.controller.cluster.datastore.utils.ClusterUtils.SHARD_REPLICAS_QNAME; import static org.opendaylight.controller.cluster.datastore.utils.ClusterUtils.SHARD_REPLICA_QNAME; import akka.actor.ActorRef; -import com.google.common.base.Preconditions; import java.util.Collection; import java.util.EnumMap; import java.util.List; import java.util.stream.Collectors; -import javax.annotation.Nonnull; import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.datastore.AbstractDataStore; import org.opendaylight.controller.cluster.datastore.config.PrefixShardConfiguration; @@ -58,8 +56,8 @@ public class PrefixedShardConfigUpdateHandler { new EnumMap<>(LogicalDatastoreType.class); public PrefixedShardConfigUpdateHandler(final ActorRef handlingActor, final MemberName memberName) { - this.handlingActor = Preconditions.checkNotNull(handlingActor); - this.memberName = Preconditions.checkNotNull(memberName); + this.handlingActor = requireNonNull(handlingActor); + this.memberName = requireNonNull(memberName); } public void initListener(final AbstractDataStore dataStore, final LogicalDatastoreType type) { @@ -89,7 +87,7 @@ public class PrefixedShardConfigUpdateHandler { } @Override - public void onDataTreeChanged(@Nonnull final Collection changes) { + public void onDataTreeChanged(final Collection changes) { changes.forEach(this::resolveChange); }