Simplify code using Java 8 features
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / ssh / client / AsyncSshHandler.java
index fa59b344b86ad1ca29c26c3cf7a3d2f971207523..149ccf16f9910dfbf38a866f5c0d89fbda50c7b6 100644 (file)
@@ -164,7 +164,7 @@ public class AsyncSshHandler extends ChannelOutboundHandlerAdapter {
 
         ClientChannel localChannel = channel;
         sshReadAsyncListener = new AsyncSshHandlerReader(() -> AsyncSshHandler.this.disconnect(ctx, ctx.newPromise()),
-            msg -> ctx.fireChannelRead(msg), localChannel.toString(), localChannel.getAsyncOut());
+            ctx::fireChannelRead, localChannel.toString(), localChannel.getAsyncOut());
 
         // if readAsyncListener receives immediate close,
         // it will close this handler and closing this handler sets channel variable to null