Switch to Objects.requireNonNull
[mdsal.git] / binding / mdsal-binding-test-utils / src / main / java / org / opendaylight / mdsal / binding / testutils / DataBrokerFailuresImpl.java
index 8b1f5db61808d440b22e181920bc6ba386be9c21..96f6d156e734f1e9b45fba70ea2198c049c887b3 100644 (file)
@@ -7,9 +7,10 @@
  */
 package org.opendaylight.mdsal.binding.testutils;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.Futures;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -59,26 +60,26 @@ public class DataBrokerFailuresImpl extends ForwardingDataBroker implements Data
     @Override
     public void failReads(ReadFailedException exception) {
         unfailReads();
-        readException = Objects.requireNonNull(exception, "exception == null");
+        readException = requireNonNull(exception, "exception == null");
     }
 
     @Override
     public void failReads(int howManyTimes, ReadFailedException exception) {
         unfailReads();
         howManyFailingReads.set(howManyTimes);
-        readException = Objects.requireNonNull(exception, "exception == null");
+        readException = requireNonNull(exception, "exception == null");
     }
 
     @Override
     public void failCommits(TransactionCommitFailedException exception) {
         unfailCommits();
-        this.commitException = Objects.requireNonNull(exception, "exception == null");
+        this.commitException = requireNonNull(exception, "exception == null");
     }
 
     @Override
     public void failCommits(int howManyTimes, TransactionCommitFailedException exception) {
         howManyFailingCommits.set(howManyTimes);
-        this.commitException = Objects.requireNonNull(exception, "exception == null");
+        this.commitException = requireNonNull(exception, "exception == null");
     }
 
     @Override