Bump upstreams to SNAPSHOTs
[netconf.git] / netconf / callhome-protocol / src / main / java / org / opendaylight / netconf / callhome / protocol / MinaSshNettyChannel.java
index a01d6a732d80bfb5d6bc8a046ad76430ae3e8cc9..e78c72147e04b362706bc233660e1c9d8bb56fc1 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.netconf.callhome.protocol;
 
 import static java.util.Objects.requireNonNull;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import io.netty.buffer.ByteBuf;
 import io.netty.channel.AbstractServerChannel;
 import io.netty.channel.ChannelConfig;
@@ -28,6 +29,7 @@ import org.opendaylight.netconf.shaded.sshd.client.session.ClientSession;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+// Non-final for testing
 class MinaSshNettyChannel extends AbstractServerChannel {
     private static final Logger LOG = LoggerFactory.getLogger(MinaSshNettyChannel.class);
     private static final ChannelMetadata METADATA = new ChannelMetadata(false);
@@ -41,14 +43,15 @@ class MinaSshNettyChannel extends AbstractServerChannel {
 
     private volatile boolean nettyClosed = false;
 
+    @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Access to our pipeline()")
     MinaSshNettyChannel(final CallHomeSessionContext context, final ClientSession session,
         final ClientChannel sshChannel) {
         this.context = requireNonNull(context);
         this.session = requireNonNull(session);
         this.sshChannel = requireNonNull(sshChannel);
-        this.sshReadHandler = new AsyncSshHandlerReader(
+        sshReadHandler = new AsyncSshHandlerReader(
             new ConnectionClosedDuringRead(), new FireReadMessage(), "netconf", sshChannel.getAsyncOut());
-        this.sshWriteAsyncHandler = new AsyncSshHandlerWriter(sshChannel.getAsyncIn());
+        sshWriteAsyncHandler = new AsyncSshHandlerWriter(sshChannel.getAsyncIn());
         pipeline().addFirst(createChannelAdapter());
     }