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%2Fmessages%2FFindPrimary.java;h=52709dd705828d2080dbd588052f7a973279b4c9;hp=9eba5c66928297a7d54ff38a097fe45a12f11bac;hb=3859df9beca8f13f1ff2b2744ed3470a1715bec3;hpb=083a04543a96ae862c48ccb4aaefc667f19d9f1e diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/FindPrimary.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/FindPrimary.java index 9eba5c6692..52709dd705 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/FindPrimary.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/FindPrimary.java @@ -5,10 +5,10 @@ * 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.datastore.messages; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import java.io.Serializable; /** @@ -20,11 +20,8 @@ public class FindPrimary implements Serializable { private final String shardName; private final boolean waitUntilReady; - public FindPrimary(String shardName, boolean waitUntilReady) { - - Preconditions.checkNotNull(shardName, "shardName should not be null"); - - this.shardName = shardName; + public FindPrimary(final String shardName, final boolean waitUntilReady) { + this.shardName = requireNonNull(shardName, "shardName should not be null"); this.waitUntilReady = waitUntilReady; }