Apply modernizations
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / streams / listeners / NotificationListenerAdapter.java
index c131237cb7e11d75ce3c988f89c110814f14fc5e..2f1da2b09cf5605e4adf5f0eb99a6cf0247edebe 100644 (file)
@@ -7,8 +7,10 @@
  */
 package org.opendaylight.netconf.sal.streams.listeners;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import java.io.IOException;
@@ -61,9 +63,9 @@ public class NotificationListenerAdapter extends AbstractCommonSubscriber implem
     NotificationListenerAdapter(final SchemaPath path, final String streamName, final String outputType,
             final ControllerContext controllerContext) {
         register(this);
-        this.outputType = Preconditions.checkNotNull(outputType);
-        this.path = Preconditions.checkNotNull(path);
-        Preconditions.checkArgument(streamName != null && !streamName.isEmpty());
+        this.outputType = requireNonNull(outputType);
+        this.path = requireNonNull(path);
+        checkArgument(streamName != null && !streamName.isEmpty());
         this.streamName = streamName;
         this.controllerContext = controllerContext;
     }