You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2019/11/05 18:12:08 UTC

[mina-sshd] 06/06: Removed some extraneous spaces

This is an automated email from the ASF dual-hosted git repository.

lgoldstein pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git

commit 119c4e0857b5584cdaf3f814b8f862e46a0e17de
Author: Lyor Goldstein <lg...@apache.org>
AuthorDate: Tue Nov 5 19:43:18 2019 +0200

    Removed some extraneous spaces
---
 .../java/org/apache/sshd/cli/client/SshClientMain.java   |  2 +-
 .../common/channel/throttle/ThrottlingPacketWriter.java  |  2 +-
 .../java/org/apache/sshd/agent/SshAgentConstants.java    |  2 +-
 .../auth/keyboard/UserAuthKeyboardInteractive.java       |  2 +-
 .../client/session/forward/PortForwardingTracker.java    |  2 +-
 .../server/command/AbstractDelegatingCommandFactory.java |  3 ++-
 .../test/java/org/apache/sshd/client/scp/ScpTest.java    | 16 ++++++++--------
 .../subsystem/sftp/SftpOutputStreamWithChannel.java      |  2 +-
 .../sshd/client/subsystem/sftp/SftpVersionsTest.java     | 12 ++++++++----
 9 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/sshd-cli/src/main/java/org/apache/sshd/cli/client/SshClientMain.java b/sshd-cli/src/main/java/org/apache/sshd/cli/client/SshClientMain.java
index fdd4707..8a3c3d2 100644
--- a/sshd-cli/src/main/java/org/apache/sshd/cli/client/SshClientMain.java
+++ b/sshd-cli/src/main/java/org/apache/sshd/cli/client/SshClientMain.java
@@ -173,7 +173,7 @@ public class SshClientMain extends SshClientCliSupport {
                         }
 
                         try (OutputStream channelOut = new NoCloseOutputStream(System.out);
-                             OutputStream channelErr =  new NoCloseOutputStream(System.err)) {
+                             OutputStream channelErr = new NoCloseOutputStream(System.err)) {
                             channel.setOut(channelOut);
                             channel.setErr(channelErr);
                             channel.open().await(); // TODO use verify and a configurable timeout
diff --git a/sshd-contrib/src/main/java/org/apache/sshd/common/channel/throttle/ThrottlingPacketWriter.java b/sshd-contrib/src/main/java/org/apache/sshd/common/channel/throttle/ThrottlingPacketWriter.java
index 3efcc85..00be698 100644
--- a/sshd-contrib/src/main/java/org/apache/sshd/common/channel/throttle/ThrottlingPacketWriter.java
+++ b/sshd-contrib/src/main/java/org/apache/sshd/common/channel/throttle/ThrottlingPacketWriter.java
@@ -86,7 +86,7 @@ public class ThrottlingPacketWriter extends AbstractLoggingBean implements Packe
         this.delegate = Objects.requireNonNull(delegate, "No delegate provided");
         ValidateUtils.checkTrue(maxPendingPackets > 0, "Invalid pending packets limit: %d", maxPendingPackets);
         this.maxPendingPackets = maxPendingPackets;
-        this.availableCount =  new AtomicInteger(maxPendingPackets);
+        this.availableCount = new AtomicInteger(maxPendingPackets);
         ValidateUtils.checkTrue(maxWait > 0L, "Invalid max. pending wait time: %d", maxWait);
         this.maxWait = maxWait;
         this.traceEnabled = log.isTraceEnabled();
diff --git a/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentConstants.java b/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentConstants.java
index 93a7883..ae65921 100644
--- a/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentConstants.java
+++ b/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentConstants.java
@@ -53,7 +53,7 @@ public final class SshAgentConstants {
     public static final byte SSH2_AGENTC_ADD_ID_CONSTRAINED = 25;
 
     // Key-type independent requests from client to agent
-    public static final byte SSH_AGENTC_ADD_SMARTCARD_KEY  = 20;
+    public static final byte SSH_AGENTC_ADD_SMARTCARD_KEY = 20;
     public static final byte SSH_AGENTC_REMOVE_SMARTCARD_KEY = 21;
     public static final byte SSH_AGENTC_LOCK = 22;
     public static final byte SSH_AGENTC_UNLOCK = 23;
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/auth/keyboard/UserAuthKeyboardInteractive.java b/sshd-core/src/main/java/org/apache/sshd/client/auth/keyboard/UserAuthKeyboardInteractive.java
index 677906e..99635be 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/auth/keyboard/UserAuthKeyboardInteractive.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/auth/keyboard/UserAuthKeyboardInteractive.java
@@ -164,7 +164,7 @@ public class UserAuthKeyboardInteractive extends AbstractUserAuth {
         }
 
         String[] prompt = (num > 0) ? new String[num] : GenericUtils.EMPTY_STRING_ARRAY;
-        boolean[] echo =  (num > 0) ? new boolean[num] : GenericUtils.EMPTY_BOOLEAN_ARRAY;
+        boolean[] echo = (num > 0) ? new boolean[num] : GenericUtils.EMPTY_BOOLEAN_ARRAY;
         boolean traceEnabled = log.isTraceEnabled();
         for (int i = 0; i < num; i++) {
             // TODO according to RFC4256: "The prompt field(s) MUST NOT be empty strings."
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/session/forward/PortForwardingTracker.java b/sshd-core/src/main/java/org/apache/sshd/client/session/forward/PortForwardingTracker.java
index b1e3785..391b884 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/session/forward/PortForwardingTracker.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/session/forward/PortForwardingTracker.java
@@ -42,7 +42,7 @@ public abstract class PortForwardingTracker
             ClientSession session, SshdSocketAddress localAddress, SshdSocketAddress boundAddress) {
         this.session = Objects.requireNonNull(session, "No client session provided");
         this.localAddress = Objects.requireNonNull(localAddress, "No local address specified");
-        this.boundAddress  = Objects.requireNonNull(boundAddress, "No bound address specified");
+        this.boundAddress = Objects.requireNonNull(boundAddress, "No bound address specified");
     }
 
     @Override
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/command/AbstractDelegatingCommandFactory.java b/sshd-core/src/main/java/org/apache/sshd/server/command/AbstractDelegatingCommandFactory.java
index 7334210..a454a42 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/command/AbstractDelegatingCommandFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/command/AbstractDelegatingCommandFactory.java
@@ -39,7 +39,8 @@ public abstract class AbstractDelegatingCommandFactory extends AbstractLoggingBe
     private CommandFactory delegate;
 
     protected AbstractDelegatingCommandFactory(String name) {
-        this.name = ValidateUtils.checkNotNullAndNotEmpty(name, "No delegating command factory name provided");
+        this.name = ValidateUtils.checkNotNullAndNotEmpty(
+            name, "No delegating command factory name provided");
     }
 
     @Override
diff --git a/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java b/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java
index b245e8a..e85d1d0 100644
--- a/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java
+++ b/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java
@@ -536,7 +536,7 @@ public class ScpTest extends BaseTestSupport {
             ScpClient scp = createScpClient(session);
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -573,7 +573,7 @@ public class ScpTest extends BaseTestSupport {
             ScpClient scp = createScpClient(session);
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -656,7 +656,7 @@ public class ScpTest extends BaseTestSupport {
             ScpClient scp = createScpClient(session);
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -700,7 +700,7 @@ public class ScpTest extends BaseTestSupport {
             ScpClient scp = createScpClient(session);
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -761,7 +761,7 @@ public class ScpTest extends BaseTestSupport {
             ScpClient scp = createScpClient(session);
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -837,7 +837,7 @@ public class ScpTest extends BaseTestSupport {
 
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -924,7 +924,7 @@ public class ScpTest extends BaseTestSupport {
             ScpClient scp = creator.createScpClient(session);
             Path targetPath = detectTargetFolder();
             Path parentPath = targetPath.getParent();
-            Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+            Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
                 ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
             CommonTestSupportUtils.deleteRecursive(scpRoot);
 
@@ -1048,7 +1048,7 @@ public class ScpTest extends BaseTestSupport {
     public void testWithGanymede() throws Exception {
         Path targetPath = detectTargetFolder();
         Path parentPath = targetPath.getParent();
-        Path scpRoot  = CommonTestSupportUtils.resolve(targetPath,
+        Path scpRoot = CommonTestSupportUtils.resolve(targetPath,
             ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName());
         CommonTestSupportUtils.deleteRecursive(scpRoot);
 
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpOutputStreamWithChannel.java b/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpOutputStreamWithChannel.java
index cf6d972..7b3b190 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpOutputStreamWithChannel.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpOutputStreamWithChannel.java
@@ -34,7 +34,7 @@ import org.apache.sshd.common.util.io.OutputStreamWithChannel;
 public class SftpOutputStreamWithChannel extends OutputStreamWithChannel {
     private final SftpClient client;
     private final String path;
-    private final byte[] bb =  new byte[1];
+    private final byte[] bb = new byte[1];
     private final byte[] buffer;
     private int index;
     private CloseableHandle handle;
diff --git a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpVersionsTest.java b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpVersionsTest.java
index ea28b5b..2bae4e0 100644
--- a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpVersionsTest.java
+++ b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpVersionsTest.java
@@ -297,9 +297,11 @@ public class SftpVersionsTest extends AbstractSftpClientTestSupport {
             }
 
             @Override
-            public void modifiedAttributes(ServerSession session, Path path, Map<String, ?> attrs, Throwable thrown) {
+            public void modifiedAttributes(
+                    ServerSession session, Path path, Map<String, ?> attrs, Throwable thrown) {
                 @SuppressWarnings("unchecked")
-                List<AclEntry> aclActual  = GenericUtils.isEmpty(attrs) ? null : (List<AclEntry>) attrs.get("acl");
+                List<AclEntry> aclActual =
+                    GenericUtils.isEmpty(attrs) ? null : (List<AclEntry>) attrs.get("acl");
                 if (getTestedVersion() > SftpConstants.SFTP_V3) {
                     assertListEquals("Mismatched modified ACL for file=" + path, aclExpected, aclActual);
                 } else {
@@ -309,9 +311,11 @@ public class SftpVersionsTest extends AbstractSftpClientTestSupport {
         });
 
         Path targetPath = detectTargetFolder();
-        Path lclSftp = CommonTestSupportUtils.resolve(targetPath, SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName());
+        Path lclSftp = CommonTestSupportUtils.resolve(
+                targetPath, SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName());
         Files.createDirectories(lclSftp.resolve("sub-folder"));
-        Path lclFile = assertHierarchyTargetFolderExists(lclSftp).resolve(getCurrentTestName() + "-" + getTestedVersion() + ".txt");
+        Path lclFile = assertHierarchyTargetFolderExists(lclSftp)
+            .resolve(getCurrentTestName() + "-" + getTestedVersion() + ".txt");
         Files.write(lclFile, getClass().getName().getBytes(StandardCharsets.UTF_8));
 
         Path parentPath = targetPath.getParent();