X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fclient%2FSimpleNetconfClientSessionListener.java;h=0390e637fa970068ca220b558dc6667e573806aa;hb=8aa7c2824179d0510a36e0630640d39b1190003f;hp=14b2bdf98028ec8000d503857eb4b6209f90a808;hpb=a201b000f7d777bd7b53748c3f13487fbb398599;p=netconf.git diff --git a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java index 14b2bdf980..0390e637fa 100644 --- a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java +++ b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java @@ -7,7 +7,8 @@ */ package org.opendaylight.netconf.client; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GlobalEventExecutor; import io.netty.util.concurrent.Promise; @@ -26,8 +27,8 @@ public class SimpleNetconfClientSessionListener implements NetconfClientSessionL private final NetconfMessage request; RequestEntry(final Promise future, final NetconfMessage request) { - this.promise = Preconditions.checkNotNull(future); - this.request = Preconditions.checkNotNull(request); + this.promise = requireNonNull(future); + this.request = requireNonNull(request); } } @@ -57,7 +58,7 @@ public class SimpleNetconfClientSessionListener implements NetconfClientSessionL @Override @SuppressWarnings("checkstyle:hiddenField") public final synchronized void onSessionUp(final NetconfClientSession clientSession) { - this.clientSession = Preconditions.checkNotNull(clientSession); + this.clientSession = requireNonNull(clientSession); LOG.debug("Client session {} went up", clientSession); dispatchRequest(); }