X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FSerializedDOMDataBroker.java;fp=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FSerializedDOMDataBroker.java;h=b28ca701a2d1e4f824c25c72852588223f397116;hp=1d5912cc6a23b917f1844026f650efb1237e56d8;hb=3859df9beca8f13f1ff2b2744ed3470a1715bec3;hpb=083a04543a96ae862c48ccb4aaefc667f19d9f1e diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/SerializedDOMDataBroker.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/SerializedDOMDataBroker.java index 1d5912cc6a..b28ca701a2 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/SerializedDOMDataBroker.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/SerializedDOMDataBroker.java @@ -5,10 +5,11 @@ * 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.md.sal.dom.broker.impl; -import com.google.common.base.Preconditions; +import static com.google.common.base.Preconditions.checkArgument; +import static java.util.Objects.requireNonNull; + import com.google.common.base.Supplier; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -55,7 +56,7 @@ public class SerializedDOMDataBroker extends AbstractDOMDataBroker { public SerializedDOMDataBroker(final Map datastores, final ListeningExecutorService executor) { super(datastores); - this.executor = Preconditions.checkNotNull(executor, "executor must not be null."); + this.executor = requireNonNull(executor, "executor must not be null."); } public DurationStatisticsTracker getCommitStatsTracker() { @@ -65,8 +66,8 @@ public class SerializedDOMDataBroker extends AbstractDOMDataBroker { @Override protected ListenableFuture commit(final DOMDataWriteTransaction transaction, final Collection cohorts, final Supplier futureValueSupplier) { - Preconditions.checkArgument(transaction != null, "Transaction must not be null."); - Preconditions.checkArgument(cohorts != null, "Cohorts must not be null."); + checkArgument(transaction != null, "Transaction must not be null."); + checkArgument(cohorts != null, "Cohorts must not be null."); LOG.debug("Tx: {} is submitted for execution.", transaction.getIdentifier()); ListenableFuture commitFuture;