Return-Path: X-Original-To: apmail-mina-commits-archive@minotaur.apache.org Delivered-To: apmail-mina-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2748A10BC1 for ; Thu, 26 Feb 2015 10:04:42 +0000 (UTC) Received: (qmail 71998 invoked by uid 500); 26 Feb 2015 10:04:42 -0000 Delivered-To: apmail-mina-commits-archive@mina.apache.org Received: (qmail 71955 invoked by uid 500); 26 Feb 2015 10:04:42 -0000 Mailing-List: contact commits-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list commits@mina.apache.org Received: (qmail 71944 invoked by uid 99); 26 Feb 2015 10:04:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2015 10:04:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CFD9AE0A46; Thu, 26 Feb 2015 10:04:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: gnodet@apache.org To: commits@mina.apache.org Date: Thu, 26 Feb 2015 10:04:42 -0000 Message-Id: <033da6e91c014425b8ff0ee4c1adf841@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] mina-sshd git commit: [SSHD-414] Make the source code (including tests) truly 1.5 compatible [SSHD-414] Make the source code (including tests) truly 1.5 compatible Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/22ef603b Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/22ef603b Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/22ef603b Branch: refs/heads/0.14.x Commit: 22ef603bd119fb7c132f34b32fefc173979087d0 Parents: d7d3be6 Author: Guillaume Nodet Authored: Thu Feb 26 11:03:55 2015 +0100 Committer: Guillaume Nodet Committed: Thu Feb 26 11:03:55 2015 +0100 ---------------------------------------------------------------------- .../sshd/client/session/ClientSessionImpl.java | 1 - .../sshd/common/session/AbstractSession.java | 3 --- .../apache/sshd/server/session/ServerSession.java | 1 - .../src/test/java/org/apache/sshd/ServerTest.java | 18 ++++++------------ 4 files changed, 6 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/22ef603b/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionImpl.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionImpl.java b/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionImpl.java index 7d9a8c9..41c769d 100644 --- a/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionImpl.java +++ b/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionImpl.java @@ -193,7 +193,6 @@ public class ClientSessionImpl extends AbstractSession implements ClientSession } } - @Override public SshFuture switchToNoneCipher() throws IOException { if (!(currentService instanceof AbstractConnectionService) || !((AbstractConnectionService) currentService).getChannels().isEmpty()) { http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/22ef603b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java index 6c342a9..975c877 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java @@ -531,19 +531,16 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea } @SuppressWarnings("unchecked") - @Override public IoWriteFuture writePacket(Buffer buffer, long timeout, TimeUnit unit) throws IOException { final IoWriteFuture writeFuture = writePacket(buffer); final DefaultSshFuture future = (DefaultSshFuture) writeFuture; final ScheduledFuture sched = factoryManager.getScheduledExecutorService().schedule(new Runnable() { - @Override public void run() { log.info("Timeout writing packet."); future.setValue(new TimeoutException()); } }, timeout, unit); future.addListener(new SshFutureListener() { - @Override public void operationComplete(IoWriteFuture future) { sched.cancel(false); } http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/22ef603b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java index 4799c69..4e91549 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java @@ -158,7 +158,6 @@ public class ServerSession extends AbstractSession { if (!clientVersion.startsWith("SSH-2.0-")) { String msg = "Unsupported protocol version: " + clientVersion; ioSession.write(new Buffer((msg + "\n").getBytes())).addListener(new SshFutureListener() { - @Override public void operationComplete(IoWriteFuture future) { close(true); } http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/22ef603b/sshd-core/src/test/java/org/apache/sshd/ServerTest.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/java/org/apache/sshd/ServerTest.java b/sshd-core/src/test/java/org/apache/sshd/ServerTest.java index 8e2ccee..914f1f6 100644 --- a/sshd-core/src/test/java/org/apache/sshd/ServerTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/ServerTest.java @@ -337,7 +337,6 @@ public class ServerTest extends BaseTest { public static class StreamCommand implements Command, Runnable { public static class Factory implements CommandFactory { - @Override public Command createCommand(String name) { return new StreamCommand(name); } @@ -352,32 +351,28 @@ public class ServerTest extends BaseTest { this.name = name; } - @Override public void setInputStream(InputStream in) { - + // ignored } - @Override public void setOutputStream(OutputStream out) { this.out = out; } - @Override public void setErrorStream(OutputStream err) { - + // ignored } - @Override public void setExitCallback(ExitCallback callback) { - + // ignored } - @Override public void start(Environment env) throws IOException { - new Thread(this).start(); + Thread t=new Thread(this); + t.setDaemon(true); + t.start(); } - @Override public void destroy() { synchronized (name) { if ("block".equals(name)) { @@ -390,7 +385,6 @@ public class ServerTest extends BaseTest { } } - @Override public void run() { try { Thread.sleep(5000);