NormalizedNodeAggregator should also report empty
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / DOMBrokerTransactionChain.java
index 1f1ea7fd9274f823a80005d998436b10eb65a977..f15fd8679e52b72b4b506488eb33ee379f3695c5 100644 (file)
@@ -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.cluster.databroker;
 
-import com.google.common.base.Preconditions;
+import static com.google.common.base.Preconditions.checkState;
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
@@ -65,12 +66,12 @@ final class DOMBrokerTransactionChain extends AbstractDOMTransactionFactory<DOMS
             final AbstractDOMBroker broker, final DOMTransactionChainListener listener) {
         super(chains);
         this.chainId = chainId;
-        this.broker = Preconditions.checkNotNull(broker);
-        this.listener = Preconditions.checkNotNull(listener);
+        this.broker = requireNonNull(broker);
+        this.listener = requireNonNull(listener);
     }
 
     private void checkNotFailed() {
-        Preconditions.checkState(state != State.FAILED, "Transaction chain has failed");
+        checkState(state != State.FAILED, "Transaction chain has failed");
     }
 
     @Override