Fix modernization issues
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / SnapshotBackedWriteTransaction.java
index fe3d219272b7b78b5d01bf8584daaceebfec90af..ee48bf6a44e703c4bbe1ef9133a8698117428073 100644 (file)
@@ -8,11 +8,11 @@
 package org.opendaylight.controller.sal.core.spi.data;
 
 import static com.google.common.base.Preconditions.checkState;
+import static java.util.Objects.requireNonNull;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
 import com.google.common.base.Throwables;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import org.eclipse.jdt.annotation.Nullable;
@@ -53,7 +53,7 @@ public class SnapshotBackedWriteTransaction<T> extends AbstractDOMStoreTransacti
     SnapshotBackedWriteTransaction(final T identifier, final boolean debug,
             final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl) {
         super(identifier, debug);
-        this.readyImpl = Preconditions.checkNotNull(readyImpl, "readyImpl must not be null.");
+        this.readyImpl = requireNonNull(readyImpl, "readyImpl must not be null.");
         mutableTree = snapshot.newModification();
         LOG.debug("Write Tx: {} allocated with snapshot {}", identifier, snapshot);
     }