mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [2/2] mina-sshd git commit: [SSHD-414] Make the source code (including tests) truly 1.5 compatible
Date Thu, 26 Feb 2015 10:04:42 GMT
[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 <gnodet@apache.org>
Authored: Thu Feb 26 11:03:55 2015 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
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<IoWriteFuture> future = (DefaultSshFuture<IoWriteFuture>)
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<IoWriteFuture>() {
-            @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<IoWriteFuture>()
{
-                @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);


Mime
View raw message