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%2FShardTransaction.java;h=9e50f17d19b99d4677e0253f2062bf518c51daab;hb=5a62c18f2e56eac7fc46181ee488b114f7447b66;hp=87dd5e3e2638fff856352b2f012523ad83631c82;hpb=7011afc1380ca25ad3de4cc8865f12fe3f5e09cf;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java index 87dd5e3e26..9e50f17d19 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java @@ -5,15 +5,15 @@ * 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; +import static java.util.Objects.requireNonNull; + import akka.actor.ActorRef; import akka.actor.PoisonPill; import akka.actor.Props; import akka.actor.ReceiveTimeout; import akka.japi.Creator; -import com.google.common.base.Preconditions; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.controller.cluster.common.actor.AbstractUntypedActorWithMetering; @@ -41,12 +41,13 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering super("shard-tx"); this.shardActor = shardActor; this.shardStats = shardStats; - this.transactionId = Preconditions.checkNotNull(transactionId); + this.transactionId = requireNonNull(transactionId); } public static Props props(final TransactionType type, final AbstractShardDataTreeTransaction transaction, final ActorRef shardActor, final DatastoreContext datastoreContext, final ShardStats shardStats) { - return Props.create(new ShardTransactionCreator(type, transaction, shardActor, datastoreContext, shardStats)); + return Props.create(ShardTransaction.class, + new ShardTransactionCreator(type, transaction, shardActor, datastoreContext, shardStats)); } protected abstract AbstractShardDataTreeTransaction getDOMStoreTransaction(); @@ -130,7 +131,7 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering ShardTransactionCreator(final TransactionType type, final AbstractShardDataTreeTransaction transaction, final ActorRef shardActor, final DatastoreContext datastoreContext, final ShardStats shardStats) { - this.transaction = Preconditions.checkNotNull(transaction); + this.transaction = requireNonNull(transaction); this.shardActor = shardActor; this.shardStats = shardStats; this.datastoreContext = datastoreContext;