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 2015/07/28 14:08:06 UTC
[2/4] mina-sshd git commit: [SSHD-542] Checkstyle validation
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
index 6d304a4..1ae19ee 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
@@ -2832,6 +2832,7 @@ public class SftpSubsystem extends AbstractLoggingBean implements Command, Runna
}
/**
+ * @param <H> The generic handle type
* @param handle The original handle id
* @param h The resolved {@link Handle} instance
* @param type The expected handle type
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/UnixDateFormat.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/UnixDateFormat.java b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/UnixDateFormat.java
index e4fefda..24c7f4d 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/UnixDateFormat.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/UnixDateFormat.java
@@ -49,6 +49,10 @@ public final class UnixDateFormat {
/**
* Get unix style date string.
+ *
+ * @param time The {@link FileTime} to format - ignored if {@code null}
+ * @return The formatted date string
+ * @see #getUnixDate(long)
*/
public static String getUnixDate(FileTime time) {
return getUnixDate((time != null) ? time.toMillis() : -1L);
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/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 8fb46a4..fd4819e 100644
--- a/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/WindowAdjustTest.java
@@ -54,10 +54,12 @@ import org.junit.Test;
import org.junit.runners.MethodSorters;
/**
+ * <p>
* This test simulates heavy traffic coming from the server towards the client making sure the traffic does not get stuck.
* Especially if the server receives window adjust message while it tries to transfer all the data.
- * <p/>
- * AsyncInPendingWrapper in this test serves as a handler for WritePendingException, which can occur when sending too many messages one after another.
+ * </p>
+ * {@link AsyncInPendingWrapper} in this test serves as a handler for
+ * {@link WritePendingException}, which can occur when sending too many messages one after another.
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WindowAdjustTest {
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/test/java/org/apache/sshd/server/ServerTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/server/ServerTest.java b/sshd-core/src/test/java/org/apache/sshd/server/ServerTest.java
index a750200..dd3f06a 100644
--- a/sshd-core/src/test/java/org/apache/sshd/server/ServerTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/server/ServerTest.java
@@ -135,9 +135,9 @@ public class ServerTest extends BaseTestSupport {
s.getService(ClientUserAuthServiceOld.class)
.auth(new org.apache.sshd.deprecated.UserAuthPassword(s, "ssh-connection", "buggy"))
;
- res = s.waitFor(ClientSession.CLOSED | ClientSession.WAIT_AUTH, 5000);
+ res = s.waitFor(ClientSession.CLOSED | ClientSession.WAIT_AUTH, TimeUnit.SECONDS.toMillis(5L));
if (res == ClientSession.TIMEOUT) {
- throw new TimeoutException();
+ throw new TimeoutException("Client session timeout signalled");
}
}
assertTrue("Number trials (" + nbTrials + ") below min.=" + MAX_AUTH_REQUESTS, nbTrials > MAX_AUTH_REQUESTS);
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/test/java/org/apache/sshd/server/command/ScpCommandFactoryTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/server/command/ScpCommandFactoryTest.java b/sshd-core/src/test/java/org/apache/sshd/server/command/ScpCommandFactoryTest.java
index 7cea385..24a9d5f 100644
--- a/sshd-core/src/test/java/org/apache/sshd/server/command/ScpCommandFactoryTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/server/command/ScpCommandFactoryTest.java
@@ -80,7 +80,7 @@ public class ScpCommandFactoryTest extends BaseTestSupport {
* Make sure the builder returns new instances on every call to
* {@link ScpCommandFactory.Builder#build()} method
* </LI>
- * <p/>
+ *
* <LI>
* Make sure values are preserved between successive invocations
* of the {@link ScpCommandFactory.Builder#build()} method
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/test/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystemFactoryTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystemFactoryTest.java b/sshd-core/src/test/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystemFactoryTest.java
index a2ad7f6..d2da178 100644
--- a/sshd-core/src/test/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystemFactoryTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystemFactoryTest.java
@@ -73,7 +73,7 @@ public class SftpSubsystemFactoryTest extends BaseTestSupport {
* Make sure the builder returns new instances on every call to
* {@link SftpSubsystemFactory.Builder#build()} method
* </LI>
- * <p/>
+ *
* <LI>
* Make sure values are preserved between successive invocations
* of the {@link SftpSubsystemFactory.Builder#build()} method