Added some synthetic access warnings suppressions
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/8f4148c0 Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/8f4148c0 Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/8f4148c0 Branch: refs/heads/master Commit: 8f4148c07debb48006a895847f6008313145fbbe Parents: 931698f Author: Lyor Goldstein <[email protected]> Authored: Wed Aug 1 21:25:10 2018 +0300 Committer: Lyor Goldstein <[email protected]> Committed: Wed Aug 1 21:25:10 2018 +0300 ---------------------------------------------------------------------- .../sshd/common/channel/ChannelAsyncInputStream.java | 3 ++- .../sshd/server/forward/TcpipServerChannel.java | 15 +++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/8f4148c0/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java index e0c6c26..ee79c84 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java @@ -69,7 +69,8 @@ public class ChannelAsyncInputStream extends AbstractCloseable implements IoInpu throw new ReadPendingException("Previous pending read not handled"); } if (buffer.available() > 0) { - int nbRead = future.buffer.putBuffer(buffer, false); + Buffer fb = future.getBuffer(); + int nbRead = fb.putBuffer(buffer, false); buffer.compact(); future.setValue(nbRead); } else { http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/8f4148c0/sshd-core/src/main/java/org/apache/sshd/server/forward/TcpipServerChannel.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/server/forward/TcpipServerChannel.java b/sshd-core/src/main/java/org/apache/sshd/server/forward/TcpipServerChannel.java index d6fd3af..3b77c45 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/forward/TcpipServerChannel.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/forward/TcpipServerChannel.java @@ -314,21 +314,20 @@ public class TcpipServerChannel extends AbstractServerChannel implements Forward }) .close(super.getInnerCloseable()) .close(new AbstractCloseable() { - CloseableExecutorService executor = ThreadUtils.newCachedThreadPool("TcpIpServerChannel-ConnectorCleanup[" + getSession() + "]"); + private final CloseableExecutorService executor = + ThreadUtils.newCachedThreadPool("TcpIpServerChannel-ConnectorCleanup[" + getSession() + "]"); + @Override + @SuppressWarnings("synthetic-access") protected CloseFuture doCloseGracefully() { - executor.submit(() -> { - connector.close(false); - }); + executor.submit(() -> connector.close(false)); return null; } @Override + @SuppressWarnings("synthetic-access") protected void doCloseImmediately() { - executor.submit(() -> { - connector.close(true) - .addListener(f -> executor.close(true)); - }); + executor.submit(() -> connector.close(true).addListener(f -> executor.close(true))); super.doCloseImmediately(); } })
