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%2FDebugThreePhaseCommitCohort.java;h=afb5773f43ff55549af747a71e87be844c0f3c30;hb=b9711f17a53a4fad48197df6c39b58e4faadc862;hp=a2a2bfca0850e746e045f561d1db0d6f5635732c;hpb=6602310b78b5bf54899456e2efa867d116731267;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java index a2a2bfca08..afb5773f43 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java @@ -7,12 +7,14 @@ */ package org.opendaylight.controller.cluster.datastore; +import static java.util.Objects.requireNonNull; + import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Preconditions; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.slf4j.Logger; @@ -31,13 +33,15 @@ class DebugThreePhaseCommitCohort extends AbstractThreePhaseCommitCohort private final AbstractThreePhaseCommitCohort delegate; private final Throwable debugContext; private final TransactionIdentifier transactionId; + + @SuppressFBWarnings("SLF4J_LOGGER_SHOULD_BE_FINAL") private Logger log = LOG; DebugThreePhaseCommitCohort(final TransactionIdentifier transactionId, final AbstractThreePhaseCommitCohort delegate, final Throwable debugContext) { - this.delegate = Preconditions.checkNotNull(delegate); - this.debugContext = Preconditions.checkNotNull(debugContext); - this.transactionId = Preconditions.checkNotNull(transactionId); + this.delegate = requireNonNull(delegate); + this.debugContext = requireNonNull(debugContext); + this.transactionId = requireNonNull(transactionId); } private ListenableFuture addFutureCallback(final ListenableFuture future) { @@ -84,7 +88,7 @@ class DebugThreePhaseCommitCohort extends AbstractThreePhaseCommitCohort } @VisibleForTesting - void setLogger(final Logger log) { - this.log = log; + void setLogger(final Logger logger) { + this.log = logger; } }