Repository: mina-sshd
Updated Branches:
  refs/heads/master 1448b79ba -> 4b02183ef


Upgraded checkstyle plugin to version 7.1.2


Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/4b02183e
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/4b02183e
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/4b02183e

Branch: refs/heads/master
Commit: 4b02183efe7d9f827f54275e2ce1d0c31fdd5bc3
Parents: 1448b79
Author: Lyor Goldstein <[email protected]>
Authored: Sun Oct 2 13:12:07 2016 +0300
Committer: Lyor Goldstein <[email protected]>
Committed: Sun Oct 2 13:12:07 2016 +0300

----------------------------------------------------------------------
 pom.xml                                               |  2 +-
 .../sshd/common/forward/LocalForwardingEntry.java     |  5 +++++
 .../test/java/org/apache/sshd/WindowAdjustTest.java   |  6 +++---
 .../test/java/org/apache/sshd/client/ClientTest.java  | 14 +++++++-------
 .../sshd/common/forward/PortForwardingLoadTest.java   |  5 +++--
 .../sshd/server/shell/InvertedShellWrapperTest.java   |  8 ++++----
 6 files changed, 23 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/4b02183e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4cc36c7..f731beb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -522,7 +522,7 @@
                         <dependency>
                             <groupId>com.puppycrawl.tools</groupId>
                             <artifactId>checkstyle</artifactId>
-                            <version>7.0</version>
+                            <version>7.1.2</version>
                             <exclusions>
                                 <!-- MCHECKSTYLE-156 -->
                                 <exclusion>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/4b02183e/sshd-core/src/main/java/org/apache/sshd/common/forward/LocalForwardingEntry.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/main/java/org/apache/sshd/common/forward/LocalForwardingEntry.java
 
b/sshd-core/src/main/java/org/apache/sshd/common/forward/LocalForwardingEntry.java
index f08afc9..8ebb4ec 100644
--- 
a/sshd-core/src/main/java/org/apache/sshd/common/forward/LocalForwardingEntry.java
+++ 
b/sshd-core/src/main/java/org/apache/sshd/common/forward/LocalForwardingEntry.java
@@ -55,6 +55,11 @@ public class LocalForwardingEntry extends SshdSocketAddress {
     }
 
     @Override
+    public boolean equals(Object o) {
+        return super.equals(o);
+    }
+
+    @Override
     public int hashCode() {
         return super.hashCode() + Objects.hashCode(getAlias());
     }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/4b02183e/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java 
b/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java
index a4fe2ae..1d89ee8 100644
--- a/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java
@@ -106,11 +106,11 @@ public class WindowAdjustTest extends BaseTestSupport {
         try (SshClient client = setupTestClient()) {
             client.start();
 
-            try (final ClientSession session = 
client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, 
TimeUnit.SECONDS).getSession()) {
+            try (ClientSession session = client.connect(getCurrentTestName(), 
TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) {
                 session.addPasswordIdentity(getCurrentTestName());
                 session.auth().verify(11L, TimeUnit.SECONDS);
 
-                try (final ClientChannel channel = 
session.createShellChannel()) {
+                try (ClientChannel channel = session.createShellChannel()) {
                     channel.setOut(new VerifyingOutputStream(channel, 
END_FILE));
                     channel.setErr(new NoCloseOutputStream(System.err));
                     channel.open().verify(15L, TimeUnit.SECONDS);
@@ -264,7 +264,7 @@ public class WindowAdjustTest extends BaseTestSupport {
         private IoOutputStream asyncIn;
 
         // Order has to be preserved for queued writes
-        private final Deque<Buffer> pending = new LinkedList<Buffer>();
+        private final Deque<Buffer> pending = new LinkedList<>();
 
         AsyncInPendingWrapper(IoOutputStream out) {
             this.asyncIn = out;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/4b02183e/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java 
b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
index b8046bb..b76a111 100644
--- a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
@@ -441,7 +441,7 @@ public class ClientTest extends BaseTestSupport {
 
         client.start();
 
-        try (final ClientSession session = createTestClientSession()) {
+        try (ClientSession session = createTestClientSession()) {
             testClientListener(channelHolder, ChannelShell.class, () -> {
                 try {
                     return session.createShellChannel();
@@ -497,7 +497,7 @@ public class ClientTest extends BaseTestSupport {
         client.start();
 
         try (ClientSession session = createTestClientSession();
-             final ChannelShell channel = session.createShellChannel()) {
+             ChannelShell channel = session.createShellChannel()) {
 
             channel.setStreaming(ClientChannel.Streaming.Async);
             channel.open().verify(5L, TimeUnit.SECONDS);
@@ -505,9 +505,9 @@ public class ClientTest extends BaseTestSupport {
             final byte[] message = 
"0123456789\n".getBytes(StandardCharsets.UTF_8);
             final int nbMessages = 1000;
 
-            try (final ByteArrayOutputStream baosOut = new 
ByteArrayOutputStream();
-                final ByteArrayOutputStream baosErr = new 
ByteArrayOutputStream()) {
-                final AtomicInteger writes = new AtomicInteger(nbMessages);
+            try (ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+                 ByteArrayOutputStream baosErr = new ByteArrayOutputStream()) {
+                AtomicInteger writes = new AtomicInteger(nbMessages);
 
                 channel.getAsyncIn().write(new 
ByteArrayBuffer(message)).addListener(new SshFutureListener<IoWriteFuture>() {
                     @Override
@@ -1184,7 +1184,7 @@ public class ClientTest extends BaseTestSupport {
         
client.setUserAuthFactories(Collections.singletonList(UserAuthKeyboardInteractiveFactory.INSTANCE));
         client.start();
 
-        try (final ClientSession session = 
client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, 
TimeUnit.SECONDS).getSession()) {
+        try (ClientSession session = client.connect(getCurrentTestName(), 
TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) {
             assertNotNull("Client session creation not signalled", 
clientSessionHolder.get());
             session.setUserInteraction(new UserInteraction() {
                 @Override
@@ -1235,7 +1235,7 @@ public class ClientTest extends BaseTestSupport {
         
client.setUserAuthFactories(Collections.singletonList(UserAuthKeyboardInteractiveFactory.INSTANCE));
         client.start();
 
-        try (final ClientSession session = 
client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, 
TimeUnit.SECONDS).getSession()) {
+        try (ClientSession session = client.connect(getCurrentTestName(), 
TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) {
             assertNotNull("Client session creation not signalled", 
clientSessionHolder.get());
             session.setUserInteraction(new UserInteraction() {
                 @Override

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/4b02183e/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingLoadTest.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingLoadTest.java
 
b/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingLoadTest.java
index 625f71d..79e3a8d 100644
--- 
a/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingLoadTest.java
+++ 
b/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingLoadTest.java
@@ -39,6 +39,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.Session;
+
 import org.apache.commons.httpclient.HostConfiguration;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpVersion;
@@ -192,7 +193,7 @@ public class PortForwardingLoadTest extends BaseTestSupport 
{
         final String payload = sb.toString();
 
         Session session = createSession();
-        try (final ServerSocket ss = new ServerSocket()) {
+        try (ServerSocket ss = new ServerSocket()) {
             ss.setReuseAddress(true);
             ss.bind(new InetSocketAddress((InetAddress) null, 0));
             int forwardedPort = ss.getLocalPort();
@@ -299,7 +300,7 @@ public class PortForwardingLoadTest extends BaseTestSupport 
{
                 + "longer Test Data. This is significantly longer Test Data. 
This is significantly "
                 + "longer Test Data. ";
         Session session = createSession();
-        try (final ServerSocket ss = new ServerSocket()) {
+        try (ServerSocket ss = new ServerSocket()) {
             ss.setReuseAddress(true);
             ss.bind(new InetSocketAddress((InetAddress) null, 0));
             int forwardedPort = ss.getLocalPort();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/4b02183e/sshd-core/src/test/java/org/apache/sshd/server/shell/InvertedShellWrapperTest.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/test/java/org/apache/sshd/server/shell/InvertedShellWrapperTest.java
 
b/sshd-core/src/test/java/org/apache/sshd/server/shell/InvertedShellWrapperTest.java
index 2a627fd..2d7e0cf 100644
--- 
a/sshd-core/src/test/java/org/apache/sshd/server/shell/InvertedShellWrapperTest.java
+++ 
b/sshd-core/src/test/java/org/apache/sshd/server/shell/InvertedShellWrapperTest.java
@@ -169,11 +169,11 @@ public class InvertedShellWrapperTest extends 
BaseTestSupport {
         final String inputContent = "shellInput";
         final String outputContent = "shellOutput";
         final String errorContent = "shellError";
-        try (final InputStream stdin = newDelayedInputStream(Long.SIZE, 
inputContent);
-             final ByteArrayOutputStream shellIn = new 
ByteArrayOutputStream(Byte.MAX_VALUE);
-             final InputStream shellOut = newDelayedInputStream(Byte.SIZE, 
outputContent);
+        try (InputStream stdin = newDelayedInputStream(Long.SIZE, 
inputContent);
+             ByteArrayOutputStream shellIn = new 
ByteArrayOutputStream(Byte.MAX_VALUE);
+             InputStream shellOut = newDelayedInputStream(Byte.SIZE, 
outputContent);
              ByteArrayOutputStream stdout = new 
ByteArrayOutputStream(outputContent.length() + Byte.SIZE);
-             final InputStream shellErr = newDelayedInputStream(Short.SIZE, 
errorContent);
+             InputStream shellErr = newDelayedInputStream(Short.SIZE, 
errorContent);
              ByteArrayOutputStream stderr = new 
ByteArrayOutputStream(errorContent.length() + Byte.SIZE)) {
 
             InvertedShell shell = new InvertedShell() {

Reply via email to