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/04/19 08:32:59 UTC
[4/5] mina-sshd git commit: Fixed some Javadoc malformed documentation
Fixed some Javadoc malformed documentation
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/32d2d053
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/32d2d053
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/32d2d053
Branch: refs/heads/master
Commit: 32d2d05310c7c852fc2b2fc5e8827ae258614f7c
Parents: 66432b0
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Thu Apr 19 11:16:20 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Thu Apr 19 11:36:20 2018 +0300
----------------------------------------------------------------------
.../common/config/keys/AuthorizedKeyEntry.java | 8 +++---
.../sshd/common/util/logging/LoggingUtils.java | 12 ++++++++
.../java/org/apache/sshd/KeyReExchangeTest.java | 6 +++-
.../java/org/apache/sshd/client/ClientTest.java | 30 --------------------
.../forward/ConcurrentConnectionTest.java | 4 +--
.../apache/sshd/git/GitLocationResolver.java | 2 +-
.../git/transport/GitSshdSessionFactory.java | 2 +-
.../subsystem/sftp/SftpClientFactory.java | 5 ++--
.../sshd/common/subsystem/sftp/SftpHelper.java | 4 +--
9 files changed, 30 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-core/src/main/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntry.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntry.java b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntry.java
index 6d90d30..a763903 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntry.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/AuthorizedKeyEntry.java
@@ -348,13 +348,13 @@ public class AuthorizedKeyEntry extends PublicKeyEntry {
* Parses a single line from an <code>authorized_keys</code> file that is <U>known</U>
* to contain login options and separates it to the options and the rest of the line.
*
- * @param line The line to be parsed
+ * @param entryLine The line to be parsed
* @return A {@link SimpleImmutableEntry} representing the parsed data where key=login options part
* and value=rest of the data - {@code null} if no data in line or line starts with comment character
* @see <A HREF="http://man.openbsd.org/sshd.8#AUTHORIZED_KEYS_FILE_FORMAT">sshd(8) - AUTHORIZED_KEYS_FILE_FORMAT</A>
*/
- public static SimpleImmutableEntry<String, String> resolveEntryComponents(String value) {
- String line = GenericUtils.replaceWhitespaceAndTrim(value);
+ public static SimpleImmutableEntry<String, String> resolveEntryComponents(String entryLine) {
+ String line = GenericUtils.replaceWhitespaceAndTrim(entryLine);
if (GenericUtils.isEmpty(line) || (line.charAt(0) == COMMENT_CHAR) /* comment ? */) {
return null;
}
@@ -403,7 +403,7 @@ public class AuthorizedKeyEntry extends PublicKeyEntry {
* </UL>
*
* @param options The options line to parse - ignored if {@code null}/empty/blank
- * @param A {@link NavigableMap} where key=case <U>insensitive</U> option name and value=the parsed value.
+ * @return A {@link NavigableMap} where key=case <U>insensitive</U> option name and value=the parsed value.
* @see #addLoginOption(Map, String) addLoginOption
*/
public static NavigableMap<String, String> parseLoginOptions(String options) {
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-core/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java
index 16fe6d1..7674471 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java
@@ -314,6 +314,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @param level The log {@link Level} mapped as follows:</BR>
*
@@ -351,6 +352,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @return A consumer whose {@link Consumer#accept(Object)} method logs nothing when invoked
*/
@@ -360,6 +362,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
* {@link String#valueOf(Object)} value of its argument if {@link Logger#isErrorEnabled()}
@@ -369,6 +372,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @param thrown A {@link Throwable} to attach to the message - ignored if {@code null}
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
@@ -397,6 +401,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
* {@link String#valueOf(Object)} value of its argument if {@link Logger#isWarnEnabled()}
@@ -406,6 +411,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @param thrown A {@link Throwable} to attach to the message - ignored if {@code null}
* @return A consumer whose {@link Consumer#accept(Object)} method logs the {@link String#valueOf(Object)}
@@ -434,6 +440,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @return A consumer whose {@link Consumer#accept(Object)} method logs the {@link String#valueOf(Object)}
* value of its argument if {@link Logger#isInfoEnabled()}
@@ -443,6 +450,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @param thrown A {@link Throwable} to attach to the message - ignored if {@code null}
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
@@ -471,6 +479,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
* {@link String#valueOf(Object)} value of its argument if {@link Logger#isDebugEnabled()}
@@ -480,6 +489,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @param thrown A {@link Throwable} to attach to the message - ignored if {@code null}
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
@@ -508,6 +518,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
* {@link String#valueOf(Object)} value of its argument if {@link Logger#isTraceEnabled()}
@@ -517,6 +528,7 @@ public final class LoggingUtils {
}
/**
+ * @param <T> Generic message type consumer
* @param logger The {@link Logger} instance to use
* @param thrown A {@link Throwable} to attach to the message - ignored if {@code null}
* @return A consumer whose {@link Consumer#accept(Object)} method logs the
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-core/src/test/java/org/apache/sshd/KeyReExchangeTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/KeyReExchangeTest.java b/sshd-core/src/test/java/org/apache/sshd/KeyReExchangeTest.java
index 63c2787..f2ca9df 100644
--- a/sshd-core/src/test/java/org/apache/sshd/KeyReExchangeTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/KeyReExchangeTest.java
@@ -664,10 +664,14 @@ public class KeyReExchangeTest extends BaseTestSupport {
}
}
- private static class TestSubsystemFactory implements SubsystemFactory {
+ static class TestSubsystemFactory implements SubsystemFactory {
public static final String NAME = "test-subsystem";
+ TestSubsystemFactory() {
+ super();
+ }
+
@Override
public Command create() {
return new Command() {
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/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 3d03e8e..67a5f57 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
@@ -75,7 +75,6 @@ import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.SshException;
import org.apache.sshd.common.channel.Channel;
import org.apache.sshd.common.channel.ChannelListener;
-import org.apache.sshd.common.channel.ChannelListenerManager;
import org.apache.sshd.common.config.keys.KeyUtils;
import org.apache.sshd.common.future.CloseFuture;
import org.apache.sshd.common.future.SshFutureListener;
@@ -113,7 +112,6 @@ import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.EchoShell;
import org.apache.sshd.util.test.EchoShellFactory;
import org.apache.sshd.util.test.TeeOutputStream;
-import org.apache.sshd.util.test.TestChannelListener;
import org.junit.After;
import org.junit.Before;
import org.junit.FixMethodOrder;
@@ -1418,34 +1416,6 @@ public class ClientTest extends BaseTestSupport {
}
}
- private static void assertListenerSizes(String phase, Map<String, ? extends TestChannelListener> listeners, int activeSize, int openSize) {
- assertListenerSizes(phase, listeners.values(), activeSize, openSize);
- }
-
- private static void assertListenerSizes(String phase, Collection<? extends TestChannelListener> listeners, int activeSize, int openSize) {
- if (GenericUtils.isEmpty(listeners)) {
- return;
- }
-
- for (TestChannelListener l : listeners) {
- if (activeSize >= 0) {
- assertEquals(phase + ": mismatched active channels size for " + l.getName() + " listener", activeSize, GenericUtils.size(l.getActiveChannels()));
- }
-
- if (openSize >= 0) {
- assertEquals(phase + ": mismatched open channels size for " + l.getName() + " listener", openSize, GenericUtils.size(l.getOpenChannels()));
- }
-
- assertEquals(phase + ": unexpected failed channels size for " + l.getName() + " listener", 0, GenericUtils.size(l.getFailedChannels()));
- }
- }
-
- private static <L extends ChannelListener & NamedResource> void addChannelListener(Map<String, L> listeners, ChannelListenerManager manager, L listener) {
- String name = listener.getName();
- assertNull("Duplicate listener named " + name, listeners.put(name, listener));
- manager.addChannelListener(listener);
- }
-
private ClientSession createTestClientSession() throws IOException {
ClientSession session = createTestClientSession(TEST_LOCALHOST);
try {
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-core/src/test/java/org/apache/sshd/common/forward/ConcurrentConnectionTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/common/forward/ConcurrentConnectionTest.java b/sshd-core/src/test/java/org/apache/sshd/common/forward/ConcurrentConnectionTest.java
index 89a282c..2bf6932 100644
--- a/sshd-core/src/test/java/org/apache/sshd/common/forward/ConcurrentConnectionTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/forward/ConcurrentConnectionTest.java
@@ -175,7 +175,7 @@ public class ConcurrentConnectionTest extends BaseTestSupport {
@Test
/*
* Run PORT_FORWARD_CLIENT_COUNT simultaneous server threads.
- *
+ *
* Emulates a web browser making a number of simultaneous requests on
* different connections to the same server HTTP specifies no more than two,
* but most modern browsers do 6 or more.
@@ -227,7 +227,7 @@ public class ConcurrentConnectionTest extends BaseTestSupport {
assertEquals("Not all clients succeeded", PORT_FORWARD_CLIENT_COUNT, success.get());
}
- /**
+ /*
* Send PAYLOAD_TO_SERVER to the server, then read PAYLOAD_TO_CLIENT from
* server. Emulates a web browser making a request
*/
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-git/src/main/java/org/apache/sshd/git/GitLocationResolver.java
----------------------------------------------------------------------
diff --git a/sshd-git/src/main/java/org/apache/sshd/git/GitLocationResolver.java b/sshd-git/src/main/java/org/apache/sshd/git/GitLocationResolver.java
index 323807f..115d4fa 100644
--- a/sshd-git/src/main/java/org/apache/sshd/git/GitLocationResolver.java
+++ b/sshd-git/src/main/java/org/apache/sshd/git/GitLocationResolver.java
@@ -48,7 +48,7 @@ public interface GitLocationResolver {
/**
* Creates a resolver that returns the same root directory for any invocation of
- * {@link #resolveRootDirectory(String, ServerSession, FileSystem) resolveRootDirectory}
+ * {@link #resolveRootDirectory(String, String[], ServerSession, FileSystem) resolveRootDirectory}
*
* @param rootDir The (never {@code null}) root directory to return
* @return The wrapper resolver
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSessionFactory.java
----------------------------------------------------------------------
diff --git a/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSessionFactory.java b/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSessionFactory.java
index bd429e5..75281c5 100644
--- a/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSessionFactory.java
+++ b/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSessionFactory.java
@@ -63,7 +63,7 @@ public class GitSshdSessionFactory extends SshSessionFactory implements ClientSe
* <B>Note:</B> in this case, the connection and authentication phase are <U>skipped</U> - i.e.,
* any specific host/port/user/password(s) specified in the GIT URI are <U>not used</U>.
*
- * @param client The (never {@code null}) client instance
+ * @param session The (never {@code null}) client session instance
*/
public GitSshdSessionFactory(ClientSession session) {
this(null, session);
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClientFactory.java
----------------------------------------------------------------------
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClientFactory.java b/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClientFactory.java
index 7f79b33..5497c91 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClientFactory.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClientFactory.java
@@ -38,6 +38,7 @@ public interface SftpClientFactory {
/**
* Create an SFTP client from this session.
*
+ * @param session The {@link ClientSession} to be used for creating the SFTP client
* @return The created {@link SftpClient}
* @throws IOException if failed to create the client
*/
@@ -48,9 +49,9 @@ public interface SftpClientFactory {
/**
* Creates an SFTP client using the specified version
*
+ * @param session The {@link ClientSession} to be used for creating the SFTP client
* @param version The version to use - <B>Note:</B> if the specified
- * version is not supported by the server then an exception
- * will occur
+ * version is not supported by the server then an exception will occur
* @return The created {@link SftpClient}
* @throws IOException If failed to create the client or use the specified version
*/
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/32d2d053/sshd-sftp/src/main/java/org/apache/sshd/common/subsystem/sftp/SftpHelper.java
----------------------------------------------------------------------
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/common/subsystem/sftp/SftpHelper.java b/sshd-sftp/src/main/java/org/apache/sshd/common/subsystem/sftp/SftpHelper.java
index 9404e1e..90cdfad 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/common/subsystem/sftp/SftpHelper.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/common/subsystem/sftp/SftpHelper.java
@@ -70,7 +70,7 @@ import org.apache.sshd.server.subsystem.sftp.UnixDateFormat;
public final class SftpHelper {
/**
* Used to control whether to append the end-of-list indicator for
- * SSH_FXP_NAME responses via {@link #indicateEndOfNamesList(Buffer, int, PropertyResolver, Boolean)}
+ * SSH_FXP_NAME responses via {@link #indicateEndOfNamesList(Buffer, int, PropertyResolver, boolean)}
* call, as indicated by <A HREF="https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.4">SFTP v6 - section 9.4</A>
*/
public static final String APPEND_END_OF_LIST_INDICATOR = "sftp-append-eol-indicator";
@@ -146,7 +146,7 @@ public final class SftpHelper {
* @param version The SFTP version being used
* @return The indicator value - {@code null} if none retrieved
* @see <A HREF="https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.4">SFTP v6 - section 9.4</A>
- * @see #indicateEndOfNamesList(Buffer, int, PropertyResolver, Boolean)
+ * @see #indicateEndOfNamesList(Buffer, int, PropertyResolver, boolean)
*/
public static Boolean getEndOfListIndicatorValue(Buffer buffer, int version) {
return (version < SftpConstants.SFTP_V6) || (buffer.available() < 1) ? null : buffer.getBoolean();