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%2Fdatastore%2Fconfig%2FModuleShardConfiguration.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fconfig%2FModuleShardConfiguration.java;h=d858b5f962ae0799d1adc9d00f783dea9bcfc76b;hp=f52687f698ab8d178a6fa015422269e4d7fc8e9a;hb=127042ea7e148d9dc0282acc3780b4754ca69e12;hpb=1e8d188e98614a1f3d781b2f80d61fcd0afde368 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/ModuleShardConfiguration.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/ModuleShardConfiguration.java index f52687f698..d858b5f962 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/ModuleShardConfiguration.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/ModuleShardConfiguration.java @@ -7,11 +7,12 @@ */ package org.opendaylight.controller.cluster.datastore.config; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import java.net.URI; import java.util.Collection; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.controller.cluster.access.concepts.MemberName; /** @@ -36,13 +37,13 @@ public class ModuleShardConfiguration { * is used. * @param shardMemberNames the names of the shard's member replicas. */ - public ModuleShardConfiguration(@Nonnull URI namespace, @Nonnull String moduleName, @Nonnull String shardName, - @Nullable String shardStrategyName, @Nonnull Collection shardMemberNames) { - this.namespace = Preconditions.checkNotNull(namespace, "nameSpace should not be null"); - this.moduleName = Preconditions.checkNotNull(moduleName, "moduleName should not be null"); - this.shardName = Preconditions.checkNotNull(shardName, "shardName should not be null"); + public ModuleShardConfiguration(@NonNull URI namespace, @NonNull String moduleName, @NonNull String shardName, + @Nullable String shardStrategyName, @NonNull Collection shardMemberNames) { + this.namespace = requireNonNull(namespace, "nameSpace should not be null"); + this.moduleName = requireNonNull(moduleName, "moduleName should not be null"); + this.shardName = requireNonNull(shardName, "shardName should not be null"); this.shardStrategyName = shardStrategyName; - this.shardMemberNames = Preconditions.checkNotNull(shardMemberNames, "shardMemberNames"); + this.shardMemberNames = requireNonNull(shardMemberNames, "shardMemberNames"); } public URI getNamespace() {