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%2Fdatastore%2Fmessages%2FLocalPrimaryShardFound.java;h=76d404bc9c41b9e7fe1585007e4923aede93bb87;hb=33ade248cf6070455349fe343c0d0fd48d274717;hp=e19dcd65b37fab7a453f4452dc074b671d976097;hpb=92cd266a60a0dd246324654d456b5068207d3037;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java index e19dcd65b3..76d404bc9c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java @@ -7,9 +7,10 @@ */ package org.opendaylight.controller.cluster.datastore.messages; -import com.google.common.base.Preconditions; -import javax.annotation.Nonnull; +import static java.util.Objects.requireNonNull; + import org.apache.commons.lang3.ObjectUtils; +import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; /** @@ -22,24 +23,22 @@ public class LocalPrimaryShardFound { private final String primaryPath; private final DataTree localShardDataTree; - public LocalPrimaryShardFound(@Nonnull String primaryPath, @Nonnull DataTree localShardDataTree) { - this.primaryPath = Preconditions.checkNotNull(primaryPath); - this.localShardDataTree = Preconditions.checkNotNull(localShardDataTree); + public LocalPrimaryShardFound(@NonNull String primaryPath, @NonNull DataTree localShardDataTree) { + this.primaryPath = requireNonNull(primaryPath); + this.localShardDataTree = requireNonNull(localShardDataTree); } - public @Nonnull String getPrimaryPath() { + public @NonNull String getPrimaryPath() { return primaryPath; } - public @Nonnull DataTree getLocalShardDataTree() { + public @NonNull DataTree getLocalShardDataTree() { return localShardDataTree; } @Override public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("LocalPrimaryShardFound [primaryPath=").append(primaryPath).append(", localShardDataTree=") - .append(ObjectUtils.identityToString(localShardDataTree)).append("]"); - return builder.toString(); + return "LocalPrimaryShardFound [primaryPath=" + primaryPath + + ", localShardDataTree=" + ObjectUtils.identityToString(localShardDataTree) + "]"; } }