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 2018/01/01 18:02:47 UTC

mina-sshd git commit: Upgraded checkstyle version to 8.7

Repository: mina-sshd
Updated Branches:
  refs/heads/master 3e2b4f8e2 -> 222118e71


Upgraded checkstyle version to 8.7


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

Branch: refs/heads/master
Commit: 222118e71fa5db3d555beafa1867e3b84eb699d2
Parents: 3e2b4f8
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Mon Jan 1 20:04:45 2018 +0200
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Mon Jan 1 20:04:45 2018 +0200

----------------------------------------------------------------------
 pom.xml                                                      | 2 +-
 .../sshd/client/auth/hostbased/HostKeyIdentityProvider.java  | 2 +-
 .../java/org/apache/sshd/client/scp/ScpClientCreator.java    | 3 +--
 .../subsystem/sftp/extensions/CheckFileHandleExtension.java  | 3 +--
 .../subsystem/sftp/extensions/CheckFileNameExtension.java    | 2 +-
 .../main/java/org/apache/sshd/common/scp/ScpFileOpener.java  | 2 +-
 .../common/session/helpers/AbstractConnectionService.java    | 3 +++
 .../main/java/org/apache/sshd/common/util/MapEntryUtils.java | 2 --
 .../java/org/apache/sshd/common/util/io/der/ASN1Type.java    | 2 +-
 .../test/java/org/apache/sshd/common/cipher/CipherTest.java  | 8 +++-----
 10 files changed, 13 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 80f1b83..59eb0d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -607,7 +607,7 @@
                         <dependency>
                             <groupId>com.puppycrawl.tools</groupId>
                             <artifactId>checkstyle</artifactId>
-                            <version>8.5</version>
+                            <version>8.7</version>
                             <exclusions>
                                 <!-- MCHECKSTYLE-156 -->
                                 <exclusion>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/client/auth/hostbased/HostKeyIdentityProvider.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/auth/hostbased/HostKeyIdentityProvider.java b/sshd-core/src/main/java/org/apache/sshd/client/auth/hostbased/HostKeyIdentityProvider.java
index 85bb82c..81c26ca 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/auth/hostbased/HostKeyIdentityProvider.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/auth/hostbased/HostKeyIdentityProvider.java
@@ -35,7 +35,7 @@ import org.apache.sshd.common.util.GenericUtils;
 @FunctionalInterface
 public interface HostKeyIdentityProvider {
     /**
-     * @return The host keys as a {@link Map.Entry} of key + certificates (which can be {@code null}/empty)
+     * @return The host keys as a {@link java.util.Map.Entry} of key + certificates (which can be {@code null}/empty)
      */
     Iterable<? extends Map.Entry<KeyPair, List<X509Certificate>>> loadHostKeys();
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/client/scp/ScpClientCreator.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/scp/ScpClientCreator.java b/sshd-core/src/main/java/org/apache/sshd/client/scp/ScpClientCreator.java
index 8f8ab63..8ae54a4 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/scp/ScpClientCreator.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/scp/ScpClientCreator.java
@@ -31,8 +31,7 @@ public interface ScpClientCreator extends ScpFileOpenerHolder {
      * Create an SCP client from this session.
      *
      * @return An {@link ScpClient} instance. <B>Note:</B> uses the currently
-     * registered {@link ScpTransferEventListener}, {@link ScpStreamResolverFactoryHolder}
-     * and {@link ScpFileOpener} if any
+     * registered {@link ScpTransferEventListener} and {@link ScpFileOpener} if any
      * @see #setScpFileOpener(ScpFileOpener)
      * @see #setScpTransferEventListener(ScpTransferEventListener)
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileHandleExtension.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileHandleExtension.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileHandleExtension.java
index e788bf8..3261a63 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileHandleExtension.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileHandleExtension.java
@@ -37,10 +37,9 @@ public interface CheckFileHandleExtension extends SftpClientExtension {
      * @param length      Length of data to hash - if zero then till EOF
      * @param blockSize   Input block size to calculate individual hashes - if
      *                    zero the <U>one</U> hash of <U>all</U> the data
-     * @return An <U>immutable</U> {@link Map.Entry} where key=hash algorithm name,
+     * @return An <U>immutable</U> {@link java.util.Map.Entry} where key=hash algorithm name,
      * value=the calculated hashes.
      * @throws IOException If failed to execute the command
      */
     Map.Entry<String, Collection<byte[]>> checkFileHandle(Handle handle, Collection<String> algorithms, long startOffset, long length, int blockSize) throws IOException;
-
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileNameExtension.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileNameExtension.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileNameExtension.java
index 8f562ba..14e0204 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileNameExtension.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CheckFileNameExtension.java
@@ -35,7 +35,7 @@ public interface CheckFileNameExtension extends SftpClientExtension {
      * @param length      Length of data to hash - if zero then till EOF
      * @param blockSize   Input block size to calculate individual hashes - if
      *                    zero the <U>one</U> hash of <U>all</U> the data
-     * @return An <U>immutable</U> {@link Map.Entry} key left=hash algorithm name,
+     * @return An <U>immutable</U> {@link java.util.Map.Entry} key left=hash algorithm name,
      * value=the calculated hashes.
      * @throws IOException If failed to execute the command
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/common/scp/ScpFileOpener.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/scp/ScpFileOpener.java b/sshd-core/src/main/java/org/apache/sshd/common/scp/ScpFileOpener.java
index 3e1f408..78e033f 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/scp/ScpFileOpener.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/scp/ScpFileOpener.java
@@ -60,7 +60,7 @@ public interface ScpFileOpener {
      *
      * @param localPath The target local path
      * @param name The target file name
-     * @param boolean preserve Whether requested to preserve the permissions and timestamp
+     * @param preserve Whether requested to preserve the permissions and timestamp
      * @param permissions The requested file permissions
      * @param time The requested {@link ScpTimestamp} - may be {@code null} if nothing to update
      * @return The actual target file path for the incoming file/directory

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
index 8f79530..262ba9d 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
@@ -683,6 +683,9 @@ public abstract class AbstractConnectionService<S extends AbstractSession>
      * Process global requests
      *
      * @param buffer The request {@link Buffer}
+     * @return An {@link IoWriteFuture} representing the sent packet - <B>Note:</B> if
+     * no reply sent then an &quot;empty&quot; future is returned - i.e., any added
+     * listeners are triggered immediately with a synthetic &quot;success&quot;
      * @throws Exception If failed to process the request
      */
     protected IoWriteFuture globalRequest(Buffer buffer) throws Exception {

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/common/util/MapEntryUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/MapEntryUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/MapEntryUtils.java
index 7f176e7..6bcc93a 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/MapEntryUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/MapEntryUtils.java
@@ -24,8 +24,6 @@ import java.util.Map;
 /**
  * Represents an un-modifiable pair of values
  *
- * @param <F> First value type
- * @param <S> Second value type
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public final class MapEntryUtils {

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/main/java/org/apache/sshd/common/util/io/der/ASN1Type.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/io/der/ASN1Type.java b/sshd-core/src/main/java/org/apache/sshd/common/util/io/der/ASN1Type.java
index a8f719e..a512ab2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/io/der/ASN1Type.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/io/der/ASN1Type.java
@@ -67,7 +67,7 @@ public enum ASN1Type {
         return typeValue;
     }
 
-    public static final ASN1Type fromName(String s) {
+    public static ASN1Type fromName(String s) {
         if (GenericUtils.isEmpty(s)) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/222118e7/sshd-core/src/test/java/org/apache/sshd/common/cipher/CipherTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/common/cipher/CipherTest.java b/sshd-core/src/test/java/org/apache/sshd/common/cipher/CipherTest.java
index 54b4ca3..70f9b30 100644
--- a/sshd-core/src/test/java/org/apache/sshd/common/cipher/CipherTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/cipher/CipherTest.java
@@ -77,12 +77,10 @@ public class CipherTest extends BaseTestSupport {
                     new Object[]{BuiltinCiphers.arcfour256, com.jcraft.jsch.jce.ARCFOUR256.class, NUM_LOADTEST_ROUNDS}
             ));
 
-    @SuppressWarnings("synthetic-access")
     private static final List<NamedResource> TEST_CIPHERS =
-            Collections.unmodifiableList(
-                    Stream.concat(PARAMETERS.stream().map(params -> (NamedResource) params[0]),
-                                  Stream.of(BuiltinCiphers.none))
-                          .collect(Collectors.toList()));
+        Collections.unmodifiableList(
+            Stream.concat(PARAMETERS.stream().map(params -> (NamedResource) params[0]), Stream.of(BuiltinCiphers.none))
+                  .collect(Collectors.toList()));
 
     private static final String CRYPT_NAMES = NamedResource.getNames(TEST_CIPHERS);
     private static SshServer sshd;