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:05 UTC

[1/4] mina-sshd git commit: Added maven-source-plugin definition in plugins management section

Repository: mina-sshd
Updated Branches:
  refs/heads/master 9dbd66ea9 -> 61e637c48


Added maven-source-plugin definition in plugins management section


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

Branch: refs/heads/master
Commit: 1a51446e33cf86abedc6e5116f86c058b45420e2
Parents: 9dbd66e
Author: Lyor Goldstein <lg...@vmware.com>
Authored: Tue Jul 28 09:52:43 2015 +0300
Committer: Lyor Goldstein <lg...@vmware.com>
Committed: Tue Jul 28 09:52:43 2015 +0300

----------------------------------------------------------------------
 pom.xml | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/1a51446e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 64f180c..98acb00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -395,6 +395,11 @@
                         <autoVersionSubmodules>true</autoVersionSubmodules>
                     </configuration>
                 </plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-source-plugin</artifactId>
+					<version>2.4</version>
+				</plugin>
             </plugins>
         </pluginManagement>
 


[4/4] mina-sshd git commit: [SSHD-542] Checkstyle validation

Posted by lg...@apache.org.
[SSHD-542] Checkstyle validation

Fixed (a lot) of Javadoc issues


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

Branch: refs/heads/master
Commit: 61e637c48348cc8ab6330a749ef1fe9be6d0fb36
Parents: 1a51446
Author: Lyor Goldstein <lg...@vmware.com>
Authored: Tue Jul 28 15:07:30 2015 +0300
Committer: Lyor Goldstein <lg...@vmware.com>
Committed: Tue Jul 28 15:07:30 2015 +0300

----------------------------------------------------------------------
 pom.xml                                         |   5 +
 .../org/apache/sshd/agent/SshAgentFactory.java  |  13 +-
 .../org/apache/sshd/agent/unix/AprLibrary.java  |   8 +-
 .../java/org/apache/sshd/client/SshClient.java  |  52 ++++---
 .../client/channel/AbstractClientChannel.java   |   8 +-
 .../channel/PtyCapableChannelSession.java       |  56 +++----
 .../sshd/client/config/keys/ClientIdentity.java |   2 +
 .../apache/sshd/client/future/AuthFuture.java   |  15 +-
 .../sshd/client/future/ConnectFuture.java       |  27 +++-
 .../apache/sshd/client/future/OpenFuture.java   |  21 ++-
 .../sshd/client/session/ClientSession.java      |  88 +++++++++--
 .../subsystem/sftp/DefaultSftpClient.java       |  13 ++
 .../sshd/client/subsystem/sftp/SftpClient.java  |   1 +
 .../sftp/extensions/CopyFileExtension.java      |   2 +-
 .../impl/AbstractSftpClientExtension.java       |   8 +-
 .../openssh/OpenSSHFsyncExtension.java          |   2 +-
 .../org/apache/sshd/common/BaseBuilder.java     |   5 +-
 .../org/apache/sshd/common/FactoryManager.java  |  16 +-
 .../org/apache/sshd/common/NamedResource.java   |   2 +
 .../org/apache/sshd/common/ServiceFactory.java  |   1 +
 .../apache/sshd/common/SshdSocketAddress.java   |   4 +-
 .../org/apache/sshd/common/channel/Channel.java |  42 +++++-
 .../common/channel/ChannelAsyncInputStream.java |   2 +-
 .../channel/ChannelAsyncOutputStream.java       |   2 +-
 .../apache/sshd/common/channel/SttySupport.java | 149 +++++++++++--------
 .../sshd/common/config/SshConfigFileReader.java |   7 +-
 .../sshd/common/config/keys/KeyUtils.java       |  18 +--
 .../sshd/common/config/keys/PublicKeyEntry.java |  14 +-
 .../sshd/common/file/util/ImmutableList.java    |   2 +-
 .../forward/DefaultTcpipForwarderFactory.java   |   1 -
 .../sshd/common/forward/TcpipForwarder.java     |  40 +++--
 .../apache/sshd/common/future/CloseFuture.java  |   2 +-
 .../sshd/common/future/DefaultCloseFuture.java  |   3 +
 .../sshd/common/future/DefaultSshFuture.java    |  38 +++--
 .../apache/sshd/common/future/SshFuture.java    |  16 +-
 .../apache/sshd/common/io/IoConnectFuture.java  |  14 +-
 .../apache/sshd/common/io/IoInputStream.java    |   3 +
 .../apache/sshd/common/io/IoOutputStream.java   |   5 +-
 .../org/apache/sshd/common/io/IoSession.java    |  12 +-
 .../apache/sshd/common/io/IoWriteFuture.java    |   4 +-
 .../sshd/common/kex/KexProposalOption.java      |   2 +-
 .../org/apache/sshd/common/kex/KeyExchange.java |   8 +-
 .../org/apache/sshd/common/random/Random.java   |   3 +
 .../session/AbstractConnectionService.java      |   4 +-
 .../sshd/common/session/AbstractSession.java    |  34 +++--
 .../sshd/common/session/ConnectionService.java  |   5 +-
 .../org/apache/sshd/common/session/Session.java |  25 +++-
 .../sshd/common/session/SessionListener.java    |  10 +-
 .../common/signature/BuiltinSignatures.java     |   2 +-
 .../subsystem/sftp/extensions/ParserUtils.java  |   2 +-
 .../openssh/FsyncExtensionParser.java           |   2 +-
 .../openssh/HardLinkExtensionParser.java        |   2 +-
 .../openssh/PosixRenameExtensionParser.java     |   2 +-
 .../openssh/StatVfsExtensionParser.java         |   2 +-
 .../org/apache/sshd/common/util/Base64.java     |  16 +-
 .../apache/sshd/common/util/CloseableUtils.java |  10 +-
 .../sshd/common/util/DirectoryScanner.java      |  25 ++--
 .../sshd/common/util/EventListenerUtils.java    |  50 +++++--
 .../apache/sshd/common/util/GenericUtils.java   |   8 +-
 .../apache/sshd/common/util/SelectorUtils.java  |  32 ++--
 .../apache/sshd/common/util/buffer/Buffer.java  |  13 +-
 .../sshd/common/util/buffer/BufferUtils.java    |  31 ++--
 .../apache/sshd/common/util/io/DERParser.java   |  12 +-
 .../org/apache/sshd/common/util/io/IoUtils.java |  14 +-
 .../sshd/common/util/logging/LoggingUtils.java  |  34 +++--
 .../sshd/common/util/threads/ThreadUtils.java   |  18 +--
 .../org/apache/sshd/server/AsyncCommand.java    |   6 +-
 .../java/org/apache/sshd/server/Command.java    |  20 ++-
 .../org/apache/sshd/server/CommandFactory.java  |   4 +-
 .../org/apache/sshd/server/SignalListener.java  |   2 +-
 .../java/org/apache/sshd/server/SshServer.java  |  17 ++-
 .../org/apache/sshd/server/auth/UserAuth.java   |   3 +-
 .../sshd/server/auth/UserAuthPassword.java      |   2 +-
 .../sshd/server/auth/gss/UserAuthGSS.java       |   4 +-
 .../server/channel/AbstractServerChannel.java   |  10 +-
 .../server/channel/ChannelDataReceiver.java     |  51 ++++---
 .../sshd/server/channel/ChannelSession.java     |   2 +
 .../sshd/server/config/keys/ServerIdentity.java |   3 +-
 .../sshd/server/forward/ForwardingFilter.java   |  24 ++-
 .../apache/sshd/server/shell/InvertedShell.java |  16 +-
 .../server/subsystem/sftp/SftpSubsystem.java    |   1 +
 .../server/subsystem/sftp/UnixDateFormat.java   |   4 +
 .../java/org/apache/sshd/WindowAdjustTest.java  |   6 +-
 .../java/org/apache/sshd/server/ServerTest.java |   4 +-
 .../server/command/ScpCommandFactoryTest.java   |   2 +-
 .../sftp/SftpSubsystemFactoryTest.java          |   2 +-
 86 files changed, 820 insertions(+), 452 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 98acb00..4b9b8ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -400,6 +400,11 @@
 					<artifactId>maven-source-plugin</artifactId>
 					<version>2.4</version>
 				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-javadoc-plugin</artifactId>
+					<version>2.10.3</version>
+				</plugin>
             </plugins>
         </pluginManagement>
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentFactory.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentFactory.java b/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentFactory.java
index 771d5e2..2684559 100644
--- a/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/agent/SshAgentFactory.java
@@ -35,7 +35,7 @@ public interface SshAgentFactory {
      * The channel will receive agent requests and need to forward them to the agent,
      * either local or through another proxy.
      *
-     * @return The channel factory used to create channels on the client side
+     * @return The (named) channel factory used to create channels on the client side
      */
     NamedFactory<Channel> getChannelForwardingFactory();
 
@@ -43,8 +43,9 @@ public interface SshAgentFactory {
      * Create an SshAgent that can be used on the client side by the authentication
      * process to send possible keys.
      *
-     * @param manager
-     * @return
+     * @param manager The {@link FactoryManager} instance
+     * @return The {@link SshAgent} instance
+     * @throws IOException If failed to create the client
      */
     SshAgent createClient(FactoryManager manager) throws IOException;
 
@@ -53,9 +54,9 @@ public interface SshAgentFactory {
      * It will usually create a channel that will forward the requests
      * to the original client.
      *
-     * @param service
-     * @return
+     * @param service The {@link ConnectionService} to use
+     * @return The {@link SshAgentServer} instance
+     * @throws IOException If failed to create the server
      */
     SshAgentServer createServer(ConnectionService service) throws IOException;
-
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/agent/unix/AprLibrary.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/agent/unix/AprLibrary.java b/sshd-core/src/main/java/org/apache/sshd/agent/unix/AprLibrary.java
index 8e78735..282fe4f 100644
--- a/sshd-core/src/main/java/org/apache/sshd/agent/unix/AprLibrary.java
+++ b/sshd-core/src/main/java/org/apache/sshd/agent/unix/AprLibrary.java
@@ -27,11 +27,15 @@ import org.apache.tomcat.jni.Pool;
 
 
 /**
+ * <p>
  * Internal singleton used for initializing correctly the APR native library
  * and the associated root memory pool.
- * <p/>
+ * </p>
+ *
+ * <p>
  * It'll finalize nicely the native resources (libraries and memory pools).
- * <p/>
+ * </p>
+ *
  * Each memory pool used in the APR transport module needs to be children of the
  * root pool {@link AprLibrary#getRootPool()}.
  *

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/SshClient.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/SshClient.java b/sshd-core/src/main/java/org/apache/sshd/client/SshClient.java
index 94ad2d7..0e651d8 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/SshClient.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/SshClient.java
@@ -76,37 +76,51 @@ import org.apache.sshd.common.util.io.NoCloseInputStream;
 import org.apache.sshd.common.util.io.NoCloseOutputStream;
 
 /**
+ * <P>
  * Entry point for the client side of the SSH protocol.
- * <p/>
+ * </P>
+ *
+ * <P>
  * The default configured client can be created using
  * the {@link #setUpDefaultClient()}.  The next step is to
  * start the client using the {@link #start()} method.
- * <p/>
+ * </P>
+ *
+ * <P>
  * Sessions can then be created using on of the
  * {@link #connect(String, String, int)} or {@link #connect(String, java.net.SocketAddress)}
  * methods.
- * <p/>
- * The client can be stopped at anytime using the {@link #stop()} method.
- * <p/>
- * Following is an example of using the SshClient:
+ * </P>
+ *
+ * <P>
+ * The client can be stopped any time using the {@link #stop()} method.
+ * </P>
+ *
+ * <P>
+ * Following is an example of using the {@code SshClient}:
+ * </P>
+ *
  * <pre>
- *    SshClient client = SshClient.setUpDefaultClient();
- *    client.start();
- *    try {
- *        ClientSession session = client.connect(login, host, port).await().getSession();
- *        session.addPasswordIdentity(password);
- *        session.auth().verify();
+ * try(SshClient client = SshClient.setUpDefaultClient()) {
+ *      client.start();
+ *
+ *      try(ClientSession session = client.connect(login, host, port).await().getSession()) {
+ *          session.addPasswordIdentity(password);
+ *          session.auth().verify();
  *
- *        ClientChannel channel = session.createChannel("shell");
- *        channel.setIn(new NoCloseInputStream(System.in));
- *        channel.setOut(new NoCloseOutputStream(System.out));
- *        channel.setErr(new NoCloseOutputStream(System.err));
- *        channel.open();
- *        channel.waitFor(ClientChannel.CLOSED, 0);
- *        session.close(false);
+ *          try(ClientChannel channel = session.createChannel("shell")) {
+ *              channel.setIn(new NoCloseInputStream(System.in));
+ *              channel.setOut(new NoCloseOutputStream(System.out));
+ *              channel.setErr(new NoCloseOutputStream(System.err));
+ *              channel.open();
+ *              channel.waitFor(ClientChannel.CLOSED, 0);
+ *          } finally {
+ *              session.close(false);
+ *          }
  *    } finally {
  *        client.stop();
  *    }
+ * }
  * </pre>
  *
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java b/sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java
index e9dd0da..69a4505 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/channel/AbstractClientChannel.java
@@ -242,14 +242,14 @@ public abstract class AbstractClientChannel extends AbstractChannel implements C
     }
 
     @Override
-    public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer) {
-        throw new IllegalStateException();
+    public OpenFuture open(int recipient, int rwSize, int packetSize, Buffer buffer) {
+        throw new UnsupportedOperationException("open(" + recipient + "," + rwSize + "," + packetSize + ") N/A");
     }
 
     @Override
-    public void handleOpenSuccess(int recipient, int rwsize, int rmpsize, Buffer buffer) {
+    public void handleOpenSuccess(int recipient, int rwSize, int packetSize, Buffer buffer) {
         this.recipient = recipient;
-        this.remoteWindow.init(rwsize, rmpsize, session.getFactoryManager().getProperties());
+        this.remoteWindow.init(rwSize, packetSize, session.getFactoryManager().getProperties());
         try {
             doOpen();
             this.opened.set(true);

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java b/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
index 5620c27..43dc700 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java
@@ -39,34 +39,36 @@ import org.apache.sshd.common.util.buffer.ByteArrayBuffer;
  * open. If they are invoked afterwards then they have no effect (silently
  * ignored).</P>
  * <P>A typical code snippet would be:</P>
- * <CODE><PRE>
- * client = SshClient.setUpDefaultClient();
- * client.start();
- * <p/>
- * try(ClientSession s = client.connect(getCurrentTestName(), "localhost", port).verify(7L, TimeUnit.SECONDS).getSession()) {
- * s.addPasswordIdentity(getCurrentTestName());
- * s.auth().verify(5L, TimeUnit.SECONDS);
- * <p/>
- * try(ChannelExec shell = s.createExecChannel("my super duper command")) {
- * shell.setEnv("var1", "val1");
- * shell.setEnv("var2", "val2");
- * ...etc...
- * shell.setPtyType(...);
- * shell.setPtyLines(...);
- * ...etc...
- * <p/>
- * shell.open().verify(5L, TimeUnit.SECONDS);
- * shell.waitFor(ClientChannel.CLOSED, TimeUnit.SECONDS.toMillis(17L));    // can use zero for infinite wait
- * <p/>
- * Integer status = shell.getExitStatus();
- * if (status.intValue() != 0) {
- * ...error...
- * }
- * }
- * } finally {
- * client.stop();
+ * <PRE>
+ * try(client = SshClient.setUpDefaultClient()) {
+ *      client.start();
+ *
+ *      try(ClientSession s = client.connect(getCurrentTestName(), "localhost", port).verify(7L, TimeUnit.SECONDS).getSession()) {
+ *          s.addPasswordIdentity(getCurrentTestName());
+ *          s.auth().verify(5L, TimeUnit.SECONDS);
+ *
+ *          try(ChannelExec shell = s.createExecChannel("my super duper command")) {
+ *              shell.setEnv("var1", "val1");
+ *              shell.setEnv("var2", "val2");
+ *              ...etc...
+ *
+ *              shell.setPtyType(...);
+ *              shell.setPtyLines(...);
+ *              ...etc...
+ *
+ *              shell.open().verify(5L, TimeUnit.SECONDS);
+ *              shell.waitFor(ClientChannel.CLOSED, TimeUnit.SECONDS.toMillis(17L));    // can use zero for infinite wait
+ *
+ *              Integer status = shell.getExitStatus();
+ *              if (status.intValue() != 0) {
+ *                  ...error...
+ *              }
+ *          }
+ *      } finally {
+ *          client.stop();
+ *      }
  * }
- * </PRE></CODE>
+ * </PRE>
  *
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/config/keys/ClientIdentity.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/config/keys/ClientIdentity.java b/sshd-core/src/main/java/org/apache/sshd/client/config/keys/ClientIdentity.java
index 8204890..8412e49 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/config/keys/ClientIdentity.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/config/keys/ClientIdentity.java
@@ -103,6 +103,7 @@ public final class ClientIdentity {
     }
 
     /**
+     * @param <C>           The generic client class
      * @param client        The {@link SshClient} to updated
      * @param strict        If {@code true} then files that do not have the required
      *                      access rights are excluded from consideration
@@ -128,6 +129,7 @@ public final class ClientIdentity {
     }
 
     /**
+     * @param <C>           The generic client class
      * @param client        The {@link SshClient} to updated
      * @param dir           The folder to scan for the built-in identities
      * @param strict        If {@code true} then files that do not have the required

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/future/AuthFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/future/AuthFuture.java b/sshd-core/src/main/java/org/apache/sshd/client/future/AuthFuture.java
index 2972567..33b64e0 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/future/AuthFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/future/AuthFuture.java
@@ -39,6 +39,8 @@ public interface AuthFuture extends SshFuture<AuthFuture> {
     /**
      * Wait and verify that the authentication succeeded within the specified timeout.
      *
+     * @param timeout   The number of time units
+     * @param unit      The {@link TimeUnit} for the timeout
      * @throws IOException if the authentication failed for any reason
      */
     void verify(long timeout, TimeUnit unit) throws IOException;
@@ -46,6 +48,7 @@ public interface AuthFuture extends SshFuture<AuthFuture> {
     /**
      * Wait and verify that the authentication succeeded within the specified timeout.
      *
+     * @param timeoutMillis Timeout in milliseconds
      * @throws IOException if the authentication failed for any reason
      */
     void verify(long timeoutMillis) throws IOException;
@@ -53,23 +56,23 @@ public interface AuthFuture extends SshFuture<AuthFuture> {
     /**
      * Returns the cause of the connection failure.
      *
-     * @return <tt>null</tt> if the connect operation is not finished yet,
+     * @return <code>null</code> if the connect operation is not finished yet,
      * or if the connection attempt is successful.
      */
     Throwable getException();
 
     /**
-     * Returns <tt>true</tt> if the authentication operation is finished successfully.
+     * @return <code>true</code> if the authentication operation is finished successfully.
      */
     boolean isSuccess();
 
     /**
-     * Returns <tt>false</tt> if the authentication operation failed.
+     * @return <code>false</code> if the authentication operation failed.
      */
     boolean isFailure();
 
     /**
-     * Returns {@code true} if the connect operation has been canceled by
+     * @return {@code true} if the connect operation has been canceled by
      * {@link #cancel()} method.
      */
     boolean isCanceled();
@@ -78,6 +81,8 @@ public interface AuthFuture extends SshFuture<AuthFuture> {
      * Notifies that the session has been authenticated.
      * This method is invoked by SSHD internally.  Please do not
      * call this method directly.
+     *
+     * @param authed Authentication success state
      */
     void setAuthed(boolean authed);
 
@@ -85,6 +90,8 @@ public interface AuthFuture extends SshFuture<AuthFuture> {
      * Sets the exception caught due to connection failure and notifies all
      * threads waiting for this future.  This method is invoked by SSHD
      * internally.  Please do not call this method directly.
+     *
+     * @param exception The caught {@link Throwable}
      */
     void setException(Throwable exception);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/future/ConnectFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/future/ConnectFuture.java b/sshd-core/src/main/java/org/apache/sshd/client/future/ConnectFuture.java
index 43fe89b..5000065 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/future/ConnectFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/future/ConnectFuture.java
@@ -31,28 +31,43 @@ import org.apache.sshd.common.future.SshFuture;
  */
 public interface ConnectFuture extends SshFuture<ConnectFuture> {
 
+    /**
+     * @return The referenced {@link ClientSession}
+     */
     ClientSession getSession();
 
-    // wait and verify that connection succeeded within specified timeout
+    /**
+     * Wait and verify that connection succeeded within specified timeout
+     *
+     * @param count The number of time units to wait
+     * @param unit  The {@link TimeUnit} for waiting
+     * @return The {@link ConnectFuture}
+     * @throws IOException If failed to verify the request on time
+     */
     ConnectFuture verify(long count, TimeUnit unit) throws IOException;
 
+    /**
+     * @param timeout The wait timeout in milliseconds
+     * @return The {@link ConnectFuture}
+     * @throws IOException If failed to verify the request on time
+     */
     ConnectFuture verify(long timeout) throws IOException;
 
     /**
      * Returns the cause of the connection failure.
      *
-     * @return <tt>null</tt> if the connect operation is not finished yet,
+     * @return <code>null</code> if the connect operation is not finished yet,
      * or if the connection attempt is successful.
      */
     Throwable getException();
 
     /**
-     * Returns <tt>true</tt> if the connect operation is finished successfully.
+     * @return <code>true</code> if the connect operation is finished successfully.
      */
     boolean isConnected();
 
     /**
-     * Returns {@code true} if the connect operation has been canceled by
+     * @return {@code true} if the connect operation has been canceled by
      * {@link #cancel()} method.
      */
     boolean isCanceled();
@@ -61,6 +76,8 @@ public interface ConnectFuture extends SshFuture<ConnectFuture> {
      * Sets the newly connected session and notifies all threads waiting for
      * this future.  This method is invoked by SSHD internally.  Please do not
      * call this method directly.
+     *
+     * @param session The {@link ClientSession}
      */
     void setSession(ClientSession session);
 
@@ -68,6 +85,8 @@ public interface ConnectFuture extends SshFuture<ConnectFuture> {
      * Sets the exception caught due to connection failure and notifies all
      * threads waiting for this future.  This method is invoked by SSHD
      * internally.  Please do not call this method directly.
+     *
+     * @param exception The caught {@link Throwable}
      */
     void setException(Throwable exception);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/future/OpenFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/future/OpenFuture.java b/sshd-core/src/main/java/org/apache/sshd/client/future/OpenFuture.java
index 116f9e5..7e6e03b 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/future/OpenFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/future/OpenFuture.java
@@ -36,25 +36,38 @@ public interface OpenFuture extends SshFuture<OpenFuture> {
      */
     void verify() throws IOException;
 
+    /**
+     * Wait and verify that the channel has been successfully opened.
+     *
+     * @param timeout The number of time units to wait
+     * @param unit    The wait {@link TimeUnit}
+     * @throws IOException If failed to verify successfully on time
+     */
     void verify(long timeout, TimeUnit unit) throws IOException;
 
+    /**
+     * Wait and verify that the channel has been successfully opened.
+     *
+     * @param timeoutMillis Wait timeout in milliseconds
+     * @throws IOException If failed to verify successfully on time
+     */
     void verify(long timeoutMillis) throws IOException;
 
     /**
      * Returns the cause of the connection failure.
      *
-     * @return <tt>null</tt> if the connect operation is not finished yet,
+     * @return <code>null</code> if the connect operation is not finished yet,
      * or if the connection attempt is successful.
      */
     Throwable getException();
 
     /**
-     * Returns <tt>true</tt> if the connect operation is finished successfully.
+     * @return <code>true</code> if the connect operation is finished successfully.
      */
     boolean isOpened();
 
     /**
-     * Returns {@code true} if the connect operation has been canceled by
+     * @return {@code true} if the connect operation has been canceled by
      * {@link #cancel()} method.
      */
     boolean isCanceled();
@@ -70,6 +83,8 @@ public interface OpenFuture extends SshFuture<OpenFuture> {
      * Sets the exception caught due to connection failure and notifies all
      * threads waiting for this future.  This method is invoked by SSHD
      * internally.  Please do not call this method directly.
+     *
+     * @param exception The caught {@link Throwable}
      */
     void setException(Throwable exception);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java b/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java
index 74cb75e..d10af5b 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java
@@ -40,22 +40,28 @@ import org.apache.sshd.common.scp.ScpTransferEventListener;
 import org.apache.sshd.common.session.Session;
 
 /**
- * An authenticated session to a given SSH server
- * <p/>
+ * <P>An authenticated session to a given SSH server</P>
+ *
+ * <P>
  * A client session is established using the {@link org.apache.sshd.client.SshClient}.
  * Once the session has been created, the user has to authenticate
  * using either {@link #addPasswordIdentity(String)} or
  * {@link #addPublicKeyIdentity(java.security.KeyPair)} followed by
  * a call to {$link #auth()}.
- * <p/>
+ * </P>
+ *
+ * <P>
  * From this session, channels can be created using the
  * {@link #createChannel(String)} method.  Multiple channels can
  * be created on a given session concurrently.
- * <p/>
+ * </P>
+ *
+ * <P>
  * When using the client in an interactive mode, the
  * {@link #waitFor(int, long)} method can be used to listen to specific
  * events such as the session being established, authenticated or closed.
- * <p/>
+ * </P>
+ *
  * When a given session is no longer used, it must be closed using the
  * {@link #close(boolean)} method.
  *
@@ -105,7 +111,7 @@ public interface ClientSession extends Session {
      * {@link #addPasswordIdentity(String)} or {@link #addPublicKeyIdentity(java.security.KeyPair)}.
      *
      * @return the authentication future
-     * @throws IOException
+     * @throws IOException if failed to generate the future
      * @see #addPasswordIdentity(String)
      * @see #addPublicKeyIdentity(java.security.KeyPair)
      */
@@ -114,31 +120,56 @@ public interface ClientSession extends Session {
     /**
      * Create a channel of the given type.
      * Same as calling <code>createChannel(type, null)</code>.
+     *
+     * @param type The channel type
+     * @return The created {@link ClientChannel}
+     * @throws IOException If failed to create the requested channel
      */
     ClientChannel createChannel(String type) throws IOException;
 
     /**
-     * Create a channel of the given type and subtype.
+     * Create a channel of the given type and sub-type.
+     *
+     * @param type      The channel type
+     * @param subType   The channel sub-type
+     * @return The created {@link ClientChannel}
+     * @throws IOException If failed to create the requested channel
      */
     ClientChannel createChannel(String type, String subType) throws IOException;
 
     /**
      * Create a channel to start a shell.
+     *
+     * @return The created {@link ChannelShell}
+     * @throws IOException If failed to create the requested channel
      */
     ChannelShell createShellChannel() throws IOException;
 
     /**
      * Create a channel to execute a command.
+     *
+     * @param command The command to execute
+     * @return The created {@link ChannelExec}
+     * @throws IOException If failed to create the requested channel
      */
     ChannelExec createExecChannel(String command) throws IOException;
 
     /**
      * Create a subsystem channel.
+     *
+     * @param subsystem The subsystem name
+     * @return The created {@link ChannelSubsystem}
+     * @throws IOException If failed to create the requested channel
      */
     ChannelSubsystem createSubsystemChannel(String subsystem) throws IOException;
 
     /**
      * Create a direct tcp-ip channel which can be used to stream data to a remote port from the server.
+     *
+     * @param local  The local address
+     * @param remote The remote address
+     * @return The created {@link ChannelDirectTcpip}
+     * @throws IOException If failed to create the requested channel
      */
     ChannelDirectTcpip createDirectTcpipChannel(SshdSocketAddress local, SshdSocketAddress remote) throws IOException;
 
@@ -204,18 +235,27 @@ public interface ClientSession extends Session {
 
     /**
      * Start forwarding the given local address on the client to the given address on the server.
+     *
+     * @param local  The local address
+     * @param remote The remote address
+     * @return The bound {@link SshdSocketAddress}
+     * @throws IOException If failed to create the requested binding
      */
     SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException;
 
     /**
      * Stop forwarding the given local address.
+     *
+     * @param local  The local address
+     * @throws IOException If failed to cancel the requested binding
      */
     void stopLocalPortForwarding(SshdSocketAddress local) throws IOException;
 
     /**
+     * <P>
      * Start forwarding tcpip from the given address on the server to the
      * given address on the client.
-     * <p/>
+     * </P>
      * The remote host name is the address to bind to on the server:
      * <ul>
      * <li>"" means that connections are to be accepted on all protocol families
@@ -227,38 +267,54 @@ public interface ClientSession extends Session {
      * <li>"127.0.0.1" and "::1" indicate listening on the loopback interfaces for
      * IPv4 and IPv6 respectively</li>
      * </ul>
+     *
+     * @param local  The local address
+     * @param remote The remote address
+     * @return The bound {@link SshdSocketAddress}
+     * @throws IOException If failed to create the requested binding
      */
     SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException;
 
     /**
      * Stop forwarding of the given remote address.
+     *
+     * @param remote The remote address
+     * @throws IOException If failed to cancel the requested binding
      */
     void stopRemotePortForwarding(SshdSocketAddress remote) throws IOException;
 
     /**
      * Start dynamic local port forwarding using a SOCKS proxy.
      *
-     * @param local
-     * @return
-     * @throws IOException
+     * @param local The local address
+     * @return The bound {@link SshdSocketAddress}
+     * @throws IOException If failed to create the requested binding
      */
     SshdSocketAddress startDynamicPortForwarding(SshdSocketAddress local) throws IOException;
 
     /**
      * Stop a previously started dynamic port forwarding.
      *
-     * @param local
-     * @throws IOException
+     * @param local The local address
+     * @throws IOException If failed to cancel the requested binding
      */
     void stopDynamicPortForwarding(SshdSocketAddress local) throws IOException;
 
     /**
      * Wait for a specific state.
+     *
+     * @param mask    The request mask
+     * @param timeout Wait time in milliseconds - non-positive means forever
+     * @return The actual state that was detected either due to the mask
+     * yielding non-zero state or due to timeout (in which case the {@link #TIMEOUT}
+     * bit is set)
      */
     int waitFor(int mask, long timeout);
 
     /**
      * Access to the metadata.
+     *
+     * @return The metadata {@link Map}
      */
     Map<Object, Object> getMetadataMap();
 
@@ -269,12 +325,14 @@ public interface ClientSession extends Session {
     ClientFactoryManager getFactoryManager();
 
     /**
-     * Switch to a none cipher for performance.
-     * <p/>
+     * <P>Switch to a none cipher for performance.</P>
+     *
+     * <P>
      * This should be done after the authentication phase has been performed.
      * After such a switch, interactive channels are not allowed anymore.
      * Both client and server must have been configured to support the none cipher.
      * If that's not the case, the returned future will be set with an exception.
+     * </P>
      *
      * @return an {@link SshFuture} that can be used to wait for the exchange
      * to be finished

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/DefaultSftpClient.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/DefaultSftpClient.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/DefaultSftpClient.java
index feb156a..feeea1b 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/DefaultSftpClient.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/DefaultSftpClient.java
@@ -130,6 +130,11 @@ public class DefaultSftpClient extends AbstractSftpClient {
 
     /**
      * Receive binary data
+     * @param buf   The buffer for the incoming data
+     * @param start Offset in buffer to place the data
+     * @param len   Available space in buffer for the data
+     * @return Actual size of received data
+     * @throws IOException If failed to receive incoming data
      */
     protected int data(byte[] buf, int start, int len) throws IOException {
         Buffer incoming = new ByteArrayBuffer(buf, start, len);
@@ -157,6 +162,11 @@ public class DefaultSftpClient extends AbstractSftpClient {
 
     /**
      * Read SFTP packets from buffer
+     *
+     * @param incoming The received {@link Buffer}
+     * @return {@code true} if data from incoming buffer was processed
+     * @throws IOException if failed to process the buffer
+     * @see #process(Buffer)
      */
     protected boolean receive(Buffer incoming) throws IOException {
         int rpos = incoming.rpos();
@@ -182,6 +192,9 @@ public class DefaultSftpClient extends AbstractSftpClient {
 
     /**
      * Process an SFTP packet
+     *
+     * @param incoming The received {@link Buffer}
+     * @throws IOException if failed to process the buffer
      */
     protected void process(Buffer incoming) throws IOException {
         Buffer buffer = new ByteArrayBuffer(incoming.available());

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClient.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClient.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClient.java
index 0c7032c..7276dd8 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClient.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpClient.java
@@ -436,6 +436,7 @@ public interface SftpClient extends SubsystemClient {
     OutputStream write(String path, int bufferSize, Collection<OpenMode> mode) throws IOException;
 
     /**
+     * @param <E>           The generic extension type
      * @param extensionType The extension type
      * @return The extension instance - <B>Note:</B> it is up to the caller
      * to invoke {@link SftpClientExtension#isSupported()} - {@code null} if

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CopyFileExtension.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CopyFileExtension.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CopyFileExtension.java
index 33b7225..fa5d364 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CopyFileExtension.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/CopyFileExtension.java
@@ -23,7 +23,7 @@ import java.io.IOException;
 
 /**
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://tools.ietf.org/html/draft-ietf-secsh-filexfer-extensions-00#section-6">copy-file</A> extension
+ * @see <A HREF="https://tools.ietf.org/html/draft-ietf-secsh-filexfer-extensions-00#section-6">copy-file extension</A>
  */
 public interface CopyFileExtension extends SftpClientExtension {
     /**

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/impl/AbstractSftpClientExtension.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/impl/AbstractSftpClientExtension.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/impl/AbstractSftpClientExtension.java
index e9f2e0e..e0cf07d 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/impl/AbstractSftpClientExtension.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/impl/AbstractSftpClientExtension.java
@@ -106,7 +106,7 @@ public abstract class AbstractSftpClientExtension extends AbstractLoggingBean im
 
     /**
      * @param buffer The {@link Buffer}
-     * @param target A target path {@link String} or {@link Handle} or {@code byte[])
+     * @param target A target path {@link String} or {@link Handle} or {@code byte[]}
      *               to be encoded in the buffer
      * @return The updated buffer
      * @throws UnsupportedOperationException If target is not one of the above
@@ -127,7 +127,7 @@ public abstract class AbstractSftpClientExtension extends AbstractLoggingBean im
     }
 
     /**
-     * @param target A target path {@link String} or {@link Handle} or {@code byte[])
+     * @param target A target path {@link String} or {@link Handle} or {@code byte[]}
      *               to be encoded in the buffer
      * @return A {@link Buffer} with the extension name set
      * @see #getCommandBuffer(Object, int)
@@ -137,7 +137,7 @@ public abstract class AbstractSftpClientExtension extends AbstractLoggingBean im
     }
 
     /**
-     * @param target    A target path {@link String} or {@link Handle} or {@code byte[])
+     * @param target    A target path {@link String} or {@link Handle} or {@code byte[]}
      *                  to be encoded in the buffer
      * @param extraSize Extra size - beyond the path/handle to be allocated
      * @return A {@link Buffer} with the extension name set
@@ -198,7 +198,7 @@ public abstract class AbstractSftpClientExtension extends AbstractLoggingBean im
             throw new SshException("Unexpected SFTP packet received: type=" + type + ", id=" + id + ", length=" + length);
         }
     }
-    
+
     protected void throwStatusException(int id, int substatus, String msg, String lang) throws IOException {
         throw new SftpException(substatus, msg);
     }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/openssh/OpenSSHFsyncExtension.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/openssh/OpenSSHFsyncExtension.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/openssh/OpenSSHFsyncExtension.java
index 0c11e5b..7c67ec9 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/openssh/OpenSSHFsyncExtension.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/extensions/openssh/OpenSSHFsyncExtension.java
@@ -28,7 +28,7 @@ import org.apache.sshd.client.subsystem.sftp.extensions.SftpClientExtension;
  * Implements the &quot;fsync@openssh.com&quot; extension
  *
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH</A> section 10
+ * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH -  section 10</A>
  */
 public interface OpenSSHFsyncExtension extends SftpClientExtension {
     void fsync(Handle fileHandle) throws IOException;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/BaseBuilder.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/BaseBuilder.java b/sshd-core/src/main/java/org/apache/sshd/common/BaseBuilder.java
index f4629d8..69de1ab 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/BaseBuilder.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/BaseBuilder.java
@@ -66,8 +66,7 @@ public class BaseBuilder<T extends AbstractFactoryManager, S extends BaseBuilder
 
     /**
      * The default {@link BuiltinCiphers} setup in order of preference
-     * as specified by <A HREF="https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5">
-     * ssh_config(5)</A>
+     * as specified by <A HREF="https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5">ssh_config(5)</A>
      */
     public static final List<BuiltinCiphers> DEFAULT_CIPHERS_PREFERENCE =
         Collections.unmodifiableList(Arrays.asList(
@@ -120,7 +119,7 @@ public class BaseBuilder<T extends AbstractFactoryManager, S extends BaseBuilder
 
     /**
      * Preferred {@link BuiltinSignatures} according to
-     * <A HREF="https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5>sshd_config(5)</A>
+     * <A HREF="https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5">sshd_config(5)</A>
      * {@code HostKeyAlgorithms} recommendation
      */
     public static final List<BuiltinSignatures> DEFAULT_SIGNATURE_PREFERENCE =

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/FactoryManager.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/FactoryManager.java b/sshd-core/src/main/java/org/apache/sshd/common/FactoryManager.java
index b9ed1e6..87fc846 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/FactoryManager.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/FactoryManager.java
@@ -164,25 +164,25 @@ public interface FactoryManager {
      * client and is not supposed to be changed at runtime (changes are not
      * bound to have any effect on a running client or server), though it may
      * affect the creation of sessions later as these values are usually not
-     * cached.</P></BR>
-     * <B>Note:</B> the <U>type</U> of the mapped property should match the
+     * cached.</P>
+     *
+     * <P><B>Note:</B> the <U>type</U> of the mapped property should match the
      * expected configuration value type - {@code Long, Integer, Boolean,
-     * String, etc...). If it doesn't, the {@code toString()} result of the
+     * String}, etc.... If it doesn't, the {@code toString()} result of the
      * mapped value is used to convert it to the required type. E.g., if
      * the mapped value is the <U>string</U> &quot;1234&quot; and the expected
      * value is a {@code long} then it will be parsed into one. Also, if
      * the mapped value is an {@code Integer} but a {@code long} is expected,
-     * then it will be converted into one.
+     * then it will be converted into one.</P>
      *
      * @return a valid <code>Map</code> containing configuration values, never {@code null}
      */
     Map<String, Object> getProperties();
 
     /**
-     * An upper case string identifying the version of the
-     * software used on client or server side.
-     * This version includes the name of the software and usually
-     * looks like: <code>SSHD-1.0</code>
+     * An upper case string identifying the version of the software used on
+     * client or server side. This version includes the name of the software
+     * and usually looks like this: <code>SSHD-1.0</code>
      *
      * @return the version of the software
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/NamedResource.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/NamedResource.java b/sshd-core/src/main/java/org/apache/sshd/common/NamedResource.java
index c1bf654..a7d192f 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/NamedResource.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/NamedResource.java
@@ -103,6 +103,7 @@ public interface NamedResource {
         /**
          * Remove the resource identified by the name from the list.
          *
+         * @param <R>       The generic resource type
          * @param name      Name of the resource - ignored if {@code null}/empty
          * @param c         The {@link Comparator} to decide whether the {@link NamedResource#getName()}
          *                  matches the <tt>name</tt> parameter
@@ -119,6 +120,7 @@ public interface NamedResource {
         }
 
         /**
+         * @param <R>       The generic resource type
          * @param name      Name of the resource - ignored if {@code null}/empty
          * @param c         The {@link Comparator} to decide whether the {@link NamedResource#getName()}
          *                  matches the <tt>name</tt> parameter

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/ServiceFactory.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/ServiceFactory.java b/sshd-core/src/main/java/org/apache/sshd/common/ServiceFactory.java
index 6df16cc..b350f55 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/ServiceFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/ServiceFactory.java
@@ -41,6 +41,7 @@ public interface ServiceFactory extends NamedResource {
          *
          * @param factories list of available factories
          * @param name      the factory name to use
+         * @param session   the referenced {@link Session}
          * @return a newly created object or {@code null} if the factory is not in the list
          * @throws IOException if session creation failed
          * @see ServiceFactory#create(Session)

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/SshdSocketAddress.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/SshdSocketAddress.java b/sshd-core/src/main/java/org/apache/sshd/common/SshdSocketAddress.java
index e4aab99..07b4a04 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/SshdSocketAddress.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/SshdSocketAddress.java
@@ -27,7 +27,7 @@ import org.apache.sshd.common.util.ValidateUtils;
 
 /**
  * <P>A simple socket address holding the host name and port number. The reason
- * it does not extend {@link InetSocketAddress} is twofold:</P></BR>
+ * it does not extend {@link InetSocketAddress} is twofold:</P>
  * <OL>
  * <LI><P>
  * The {@link InetSocketAddress} performs a DNS resolution on the
@@ -35,7 +35,7 @@ import org.apache.sshd.common.util.ValidateUtils;
  * create a connection using this address (thus the {@link #toInetSocketAddress()}
  * call which executes this query
  * </P></LI>
- * <p/>
+ *
  * <LI><P>
  * If empty host name is provided we replace it with the <I>any</I>
  * address of 0.0.0.0

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/channel/Channel.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/Channel.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/Channel.java
index 667a64f..27721f4 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/Channel.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/Channel.java
@@ -34,8 +34,14 @@ import org.apache.sshd.common.util.buffer.Buffer;
  */
 public interface Channel extends Closeable {
 
+    /**
+     * @return Local channel identifier
+     */
     int getId();
 
+    /**
+     * @return Remote channel identifier
+     */
     int getRecipient();
 
     Window getLocalWindow();
@@ -65,18 +71,42 @@ public interface Channel extends Closeable {
 
     /**
      * For a server channel, this method will actually open the channel
+     *
+     * @param recipient  Recipient identifier
+     * @param rwSize     Read/Write window size
+     * @param packetSize Preferred maximum packet size
+     * @param buffer     Incoming {@link Buffer} that triggered the call.
+     *                   <B>Note:</B> the buffer's read position is exactly
+     *                   <U>after</U> the information that read to this call
+     *                   was decoded
+     * @return An {@link OpenFuture} for the channel open request
      */
-    OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer);
+    OpenFuture open(int recipient, int rwSize, int packetSize, Buffer buffer);
 
     /**
-     * For a client channel, this method will be called internally by the session when the confirmation
-     * has been received.
+     * For a client channel, this method will be called internally by the
+     * session when the confirmation has been received.
+     *
+     * @param recipient  Recipient identifier
+     * @param rwSize     Read/Write window size
+     * @param packetSize Preferred maximum packet size
+     * @param buffer     Incoming {@link Buffer} that triggered the call.
+     *                   <B>Note:</B> the buffer's read position is exactly
+     *                   <U>after</U> the information that read to this call
+     *                   was decoded
+     * @throws IOException If failed to handle the success
      */
-    void handleOpenSuccess(int recipient, int rwsize, int rmpsize, Buffer buffer) throws IOException;
+    void handleOpenSuccess(int recipient, int rwSize, int packetSize, Buffer buffer) throws IOException;
 
     /**
-     * For a client channel, this method will be called internally by the session when
-     * the server has rejected this channel opening.
+     * For a client channel, this method will be called internally by the
+     * session when the server has rejected this channel opening.
+     *
+     * @param buffer     Incoming {@link Buffer} that triggered the call.
+     *                   <B>Note:</B> the buffer's read position is exactly
+     *                   <U>after</U> the information that read to this call
+     *                   was decoded
+     * @throws IOException If failed to handle the success
      */
     void handleOpenFailure(Buffer buffer) throws IOException;
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java
index b950afc..06f9a65 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncInputStream.java
@@ -58,7 +58,7 @@ public class ChannelAsyncInputStream extends CloseableUtils.AbstractCloseable im
         } else {
             synchronized (buffer) {
                 if (pending != null) {
-                    throw new ReadPendingException();
+                    throw new ReadPendingException("Previous pending read not handled");
                 }
                 pending = future;
             }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncOutputStream.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncOutputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncOutputStream.java
index 85edc24..6a705f8 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncOutputStream.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncOutputStream.java
@@ -52,7 +52,7 @@ public class ChannelAsyncOutputStream extends CloseableUtils.AbstractCloseable i
             future.setValue(new IOException("Closed"));
         } else {
             if (!pendingWrite.compareAndSet(null, future)) {
-                throw new WritePendingException();
+                throw new WritePendingException("No write pending future");
             }
             doWriteIfPossible(false);
         }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/channel/SttySupport.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/SttySupport.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/SttySupport.java
index 7bdf320..7cf2650 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/SttySupport.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/SttySupport.java
@@ -21,9 +21,12 @@ package org.apache.sshd.common.channel;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.TreeMap;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * Support for stty command on unix
@@ -31,10 +34,16 @@ import java.util.TreeMap;
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
 public final class SttySupport {
+    public static final int DEFAULT_TERMINAL_WIDTH = 80;
+    public static final int  DEFAULT_TERMINAL_HEIGHT = 24;
 
-    private static String sttyCommand = System.getProperty("sshd.sttyCommand", "stty");
-    private static String ttyProps;
-    private static long ttyPropsLastFetched;
+    public static final String SSHD_STTY_COMMAND_PROP = "sshd.sttyCommand";
+    public static final String DEFAULT_SSHD_STTY_COMMAND = "stty";
+
+    private static final AtomicReference<String> STTY_COMMAND_HOLDER =
+            new AtomicReference<String>(System.getProperty(SSHD_STTY_COMMAND_PROP, DEFAULT_SSHD_STTY_COMMAND));
+    private static final AtomicReference<String> TTY_PROPS_HOLDER = new AtomicReference<String>(null);
+    private static final AtomicLong TTY_PROPS_LAST_FETCHED_HOLDER = new AtomicLong(0L);
 
     private SttySupport() {
         throw new UnsupportedOperationException("No instance allowed");
@@ -125,51 +134,53 @@ public final class SttySupport {
     }
 
     /**
-     * Returns the value of "stty size" width param.
-     * <p/>
+     * <P>Returns the value of "stty size" width param.</P>
+     *
+     * <P>
      * <strong>Note</strong>: this method caches the value from the
      * first time it is called in order to increase speed, which means
      * that changing to size of the terminal will not be reflected
      * in the console.
+     * </P>
+     *
+     * @return The terminal width
      */
     public static int getTerminalWidth() {
-        int val = -1;
-
         try {
-            val = getTerminalProperty("columns");
-        } catch (Exception e) {
-            // ignored
-        }
+            int val = getTerminalProperty("columns");
+            if (val == -1) {
+                val = DEFAULT_TERMINAL_WIDTH;
+            }
 
-        if (val == -1) {
-            val = 80;
+            return val;
+        } catch (Exception e) {
+            return DEFAULT_TERMINAL_WIDTH;  // debug breakpoint
         }
-
-        return val;
     }
 
     /**
-     * Returns the value of "stty size" height param.
-     * <p/>
+     * <P>Returns the value of "stty size" height param.</P>
+     *
+     * <P>
      * <strong>Note</strong>: this method caches the value from the
      * first time it is called in order to increase speed, which means
      * that changing to size of the terminal will not be reflected
      * in the console.
+     * </P>
+     *
+     * @return The terminal height
      */
     public static int getTerminalHeight() {
-        int val = -1;
-
         try {
-            val = getTerminalProperty("rows");
-        } catch (Exception e) {
-            // ignored
-        }
+            int val = getTerminalProperty("rows");
+            if (val == -1) {
+                val = DEFAULT_TERMINAL_HEIGHT;
+            }
 
-        if (val == -1) {
-            val = 24;
+            return val;
+        } catch (Exception e) {
+            return DEFAULT_TERMINAL_HEIGHT;  // debug breakpoint
         }
-
-        return val;
     }
 
     private static int getTerminalProperty(String prop)
@@ -197,17 +208,25 @@ public final class SttySupport {
 
     public static String getTtyProps() throws IOException, InterruptedException {
         // tty properties are cached so we don't have to worry too much about getting term widht/height
-        if (ttyProps == null || System.currentTimeMillis() - ttyPropsLastFetched > 1000) {
-            ttyProps = stty("-a");
-            ttyPropsLastFetched = System.currentTimeMillis();
+        long now = System.currentTimeMillis();
+        long lastFetched = TTY_PROPS_LAST_FETCHED_HOLDER.get();
+        if ((TTY_PROPS_HOLDER.get() == null) || ((now - lastFetched) > 1000L)) {
+            TTY_PROPS_HOLDER.set(stty("-a"));
+            TTY_PROPS_LAST_FETCHED_HOLDER.set(System.currentTimeMillis());
         }
-        return ttyProps;
-    }
 
+        return TTY_PROPS_HOLDER.get();
+    }
 
     /**
      * Execute the stty command with the specified arguments
      * against the current active terminal.
+     *
+     * @param args The command arguments
+     * @return The execution result
+     * @throws IOException If failed to execute the command
+     * @throws InterruptedException If interrupted while awaiting command execution
+     * @see #exec(String)
      */
     public static String stty(final String args)
             throws IOException, InterruptedException {
@@ -217,6 +236,12 @@ public final class SttySupport {
     /**
      * Execute the specified command and return the output
      * (both stdout and stderr).
+     *
+     * @param cmd The command to execute
+     * @return The execution result
+     * @throws IOException If failed to execute the command
+     * @throws InterruptedException If interrupted while awaiting command execution
+     * @see #exec(String[])
      */
     public static String exec(final String cmd)
             throws IOException, InterruptedException {
@@ -230,48 +255,52 @@ public final class SttySupport {
     /**
      * Execute the specified command and return the output
      * (both stdout and stderr).
+     *
+     * @param cmd The command components
+     * @return The execution result
+     * @throws IOException If failed to execute the command
+     * @throws InterruptedException If interrupted while awaiting command execution
      */
-    private static String exec(final String[] cmd)
+    private static String exec(final String ... cmd)
             throws IOException, InterruptedException {
-        ByteArrayOutputStream bout = new ByteArrayOutputStream();
-
-        Process p = Runtime.getRuntime().exec(cmd);
-        int c;
-        InputStream in;
-
-        in = p.getInputStream();
-
-        while ((c = in.read()) != -1) {
-            bout.write(c);
+        try (ByteArrayOutputStream bout = new ByteArrayOutputStream()) {
+            Process p = Runtime.getRuntime().exec(cmd);
+            copyStream(p.getInputStream(), bout);
+            copyStream(p.getErrorStream(), bout);
+            p.waitFor();
+
+            String result = new String(bout.toByteArray());
+            return result;
         }
+    }
 
-        in = p.getErrorStream();
+    private static int copyStream(InputStream in, OutputStream bout) throws IOException {
+        int count = 0;
+        while (true) {
+            int c = in.read();
+            if (c == (-1)) {
+                return count;
+            }
 
-        while ((c = in.read()) != -1) {
             bout.write(c);
+            count++;
         }
-
-        p.waitFor();
-
-        String result = new String(bout.toByteArray());
-
-        return result;
     }
 
     /**
-     * The command to use to set the terminal options. Defaults
-     * to "stty", or the value of the system property "jline.sttyCommand".
+     * @return The command to use to set the terminal options.
+     * @see #setSttyCommand(String)
      */
-    public static void setSttyCommand(String cmd) {
-        sttyCommand = cmd;
+    public static String getSttyCommand() {
+        return STTY_COMMAND_HOLDER.get();
     }
 
     /**
-     * The command to use to set the terminal options. Defaults
-     * to "stty", or the value of the system property "jline.sttyCommand".
+     * @param cmd The command to use to set the terminal options. Defaults
+     * to {@link #DEFAULT_SSHD_STTY_COMMAND}, or the value of the
+     * {@link #SSHD_STTY_COMMAND_PROP} system property if not set via this method
      */
-    public static String getSttyCommand() {
-        return sttyCommand;
+    public static void setSttyCommand(String cmd) {
+        STTY_COMMAND_HOLDER.set(cmd);
     }
-
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/config/SshConfigFileReader.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/config/SshConfigFileReader.java b/sshd-core/src/main/java/org/apache/sshd/common/config/SshConfigFileReader.java
index ae3637d..73cde24 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/config/SshConfigFileReader.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/config/SshConfigFileReader.java
@@ -398,7 +398,7 @@ public final class SshConfigFileReader {
      * @param props The {@link Properties} - ignored if {@code null}/empty
      * @return A {@link BuiltinSignatures.ParseResult} of all the {@link NamedFactory}
      * whose name appears in the string and represent a built-in signature. Any
-     * unknown name is <U>ignored</I>. The order of the returned result is the
+     * unknown name is <U>ignored</U>. The order of the returned result is the
      * same as the original order - bar the unknown signatures. <B>Note:</B> it
      * is up to caller to ensure that the list does not contain duplicates
      * @see #HOST_KEY_ALGORITHMS_CONFIG_PROP
@@ -445,7 +445,7 @@ public final class SshConfigFileReader {
 
     /**
      * <P>Configures an {@link AbstractFactoryManager} with the values read from
-     * some configuration. Currently it configures:</P></BR>
+     * some configuration. Currently it configures:</P>
      * <UL>
      * <LI>The {@link Cipher}s - via the {@link #CIPHERS_CONFIG_PROP}</LI>
      * <LI>The {@link Mac}s - via the {@link #MACS_CONFIG_PROP}</LI>
@@ -453,6 +453,7 @@ public final class SshConfigFileReader {
      * <LI>The {@link Compression} - via the {@link #COMPRESSION_PROP}</LI>
      * </UL>
      *
+     * @param <M>               The generic factory manager
      * @param manager           The {@link AbstractFactoryManager} to configure
      * @param props             The {@link Properties} to use for configuration - <B>Note:</B>
      *                          if any known configuration value has a default and does not appear in the
@@ -528,6 +529,7 @@ public final class SshConfigFileReader {
     }
 
     /**
+     * @param <M>               The generic factory manager
      * @param manager           The {@link AbstractFactoryManager} to set up (may not be {@code null})
      * @param props             The (non-{@code null}) {@link Properties} containing the configuration
      * @param lenient           If {@code true} then any unknown/unsupported configuration
@@ -565,6 +567,7 @@ public final class SshConfigFileReader {
     /**
      * Configure the factory manager using one of the known {@link CompressionConfigValue}s.
      *
+     * @param <M>               The generic factory manager
      * @param manager           The {@link AbstractFactoryManager} to configure
      * @param props             The configuration {@link Properties}
      * @param lenient           If {@code true} and an unknown value is provided then

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
index 97013cf..f1934d2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
@@ -108,21 +108,21 @@ public final class KeyUtils {
     }
 
     /**
-     * <P>Checks if a path has strict permissions</P></BR>
+     * <P>Checks if a path has strict permissions</P>
      * <UL>
-     * <LI>
+     * <LI><P>
      * The path may not have {@link PosixFilePermission#OTHERS_EXECUTE}
      * permission
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * (For {@code Unix}) The path may not have group or others permissions
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * (For {@code Unix}) If the path is a file, then its folder may not have
      * group or others permissions
-     * </LI>
+     * </P></LI>
      * </UL>
      *
      * @param path    The {@link Path} to be checked - ignored if {@code null}

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntry.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntry.java b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntry.java
index 60c91c6..d099e33 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntry.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/config/keys/PublicKeyEntry.java
@@ -37,10 +37,11 @@ import org.apache.sshd.common.util.buffer.BufferUtils;
 
 /**
  * <P>Represents a {@link PublicKey} whose data is formatted according to
- * the <A HREF="http://en.wikibooks.org/wiki/OpenSSH">OpenSSH</A> format:</P></BR>
- * <CODE><PRE>
- * <key-type> <base64-encoded-public-key-data>
- * </CODE></PRE>
+ * the <A HREF="http://en.wikibooks.org/wiki/OpenSSH">OpenSSH</A> format:</P>
+ *
+ * <PRE>
+ * &lt;key-type&gt; &lt;base64-encoded-public-key-data&gt;
+ * </PRE>
  *
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
@@ -177,6 +178,7 @@ public class PublicKeyEntry implements Serializable {
     }
 
     /**
+     * @param <E>   The generic entry type
      * @param entry The {@link PublicKeyEntry} whose contents are to be
      *              updated - ignored if {@code null}
      * @param data  Assumed to contain at least {@code key-type base64-data} (anything
@@ -214,7 +216,8 @@ public class PublicKeyEntry implements Serializable {
     /**
      * @param key The {@link PublicKey}
      * @return The {@code OpenSSH} encoded data
-     * @throws IllegalArgumentException
+     * @throws IllegalArgumentException If failed to encode
+     * @see #appendPublicKeyEntry(Appendable, PublicKey)
      */
     public static String toString(PublicKey key) throws IllegalArgumentException {
         try {
@@ -227,6 +230,7 @@ public class PublicKeyEntry implements Serializable {
     /**
      * Encodes a public key data the same way as the {@link #parsePublicKeyEntry(String)} expects it
      *
+     * @param <A> The generic appendable class
      * @param sb  The {@link Appendable} instance to encode the data into
      * @param key The {@link PublicKey}
      * @return The updated appendable instance

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/file/util/ImmutableList.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/file/util/ImmutableList.java b/sshd-core/src/main/java/org/apache/sshd/common/file/util/ImmutableList.java
index 123bbf2..f8124da 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/file/util/ImmutableList.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/file/util/ImmutableList.java
@@ -23,7 +23,7 @@ import java.util.AbstractList;
 /**
  * Simple immutable array list
  *
- * @param <T>
+ * @param <T> The element type
  */
 public class ImmutableList<T> extends AbstractList<T> {
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultTcpipForwarderFactory.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultTcpipForwarderFactory.java b/sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultTcpipForwarderFactory.java
index d9837ec..8147f33 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultTcpipForwarderFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultTcpipForwarderFactory.java
@@ -24,7 +24,6 @@ import org.apache.sshd.common.session.ConnectionService;
  * The default {@link TcpipForwarderFactory} implementation.
  *
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see {@link DefaultTcpipForwarder}
  */
 public class DefaultTcpipForwarderFactory implements TcpipForwarderFactory {
     public static final DefaultTcpipForwarderFactory INSTANCE = new DefaultTcpipForwarderFactory();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/forward/TcpipForwarder.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/forward/TcpipForwarder.java b/sshd-core/src/main/java/org/apache/sshd/common/forward/TcpipForwarder.java
index a278ab0..c278977 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/forward/TcpipForwarder.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/forward/TcpipForwarder.java
@@ -31,6 +31,7 @@ public interface TcpipForwarder extends Closeable {
      *
      * @param remote The remote address
      * @param local  The local address
+     * @return The bound {@link SshdSocketAddress}
      * @throws IOException If failed to handle request
      */
     SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException;
@@ -44,23 +45,42 @@ public interface TcpipForwarder extends Closeable {
     void stopLocalPortForwarding(SshdSocketAddress local) throws IOException;
 
     /**
-     * Start forwarding tcpip from the given remote address to the
+     * <P>
+     * Start forwarding tcp/ip from the given remote address to the
      * given local address.
-     * <p/>
+     * </P>
+     *
+     * <P>
      * The remote host name is the address to bind to on the server:
+     * </P>
      * <ul>
-     * <li>"" means that connections are to be accepted on all protocol families
-     * supported by the SSH implementation</li>
-     * <li>"0.0.0.0" means to listen on all IPv4 addresses</li>
-     * <li>"::" means to listen on all IPv6 addresses</li>
-     * <li>"localhost" means to listen on all protocol families supported by the SSH
-     * implementation on loopback addresses only, [RFC3330] and RFC3513]</li>
-     * <li>"127.0.0.1" and "::1" indicate listening on the loopback interfaces for
-     * IPv4 and IPv6 respectively</li>
+     * <li>
+     * &quot;&quot; means that connections are to be accepted on all protocol families
+     * supported by the SSH implementation
+     * </li>
+     *
+     * <li>
+     * &quot;0.0.0.0&quot; means to listen on all IPv4 addresses
+     * </li>
+     *
+     * <li>
+     * &quot;::&quot; means to listen on all IPv6 addresses
+     * </li>
+     *
+     * <li>
+     * &quot;localhost&quot; means to listen on all protocol families supported by the SSH
+     * implementation on loopback addresses only, [RFC3330] and RFC3513]
+     * </li>
+     *
+     * <li>
+     * &quot;127.0.0.1&quot; and &quot;::1&quot; indicate listening on the loopback interfaces for
+     * IPv4 and IPv6 respectively
+     * </li>
      * </ul>
      *
      * @param remote The remote address
      * @param local  The local address
+     * @return The bound {@link SshdSocketAddress}
      * @throws IOException If failed to handle request
      */
     SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/future/CloseFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/future/CloseFuture.java b/sshd-core/src/main/java/org/apache/sshd/common/future/CloseFuture.java
index 64fc756..5efecc2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/future/CloseFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/future/CloseFuture.java
@@ -26,7 +26,7 @@ package org.apache.sshd.common.future;
 public interface CloseFuture extends SshFuture<CloseFuture> {
 
     /**
-     * Returns <tt>true</tt> if the close request is finished and the target is closed.
+     * @return <tt>true</tt> if the close request is finished and the target is closed.
      */
     boolean isClosed();
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultCloseFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultCloseFuture.java b/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultCloseFuture.java
index 3f0da11..368ff8d 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultCloseFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultCloseFuture.java
@@ -27,6 +27,9 @@ public class DefaultCloseFuture extends DefaultSshFuture<CloseFuture> implements
 
     /**
      * Create a new instance
+     *
+     * @param lock A synchronization object for locking access - if {@code null}
+     * then synchronization occurs on {@code this} instance
      */
     public DefaultCloseFuture(Object lock) {
         super(lock);

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultSshFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultSshFuture.java b/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultSshFuture.java
index 973f226..e6bd532 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultSshFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/future/DefaultSshFuture.java
@@ -53,6 +53,9 @@ public class DefaultSshFuture<T extends SshFuture> extends AbstractLoggingBean i
 
     /**
      * Creates a new instance.
+     *
+     * @param lock A synchronization object for locking access - if {@code null}
+     * then synchronization occurs on {@code this} instance
      */
     public DefaultSshFuture(Object lock) {
         this.lock = lock != null ? lock : this;
@@ -104,32 +107,33 @@ public class DefaultSshFuture<T extends SshFuture> extends AbstractLoggingBean i
 
     /**
      * <P>Waits (interruptible) for the specified timeout (msec.) and then checks
-     * the result:</P><BR/>
+     * the result:</P>
      * <UL>
-     * <LI>
+     * <LI><P>
      * If result is {@code null} then timeout is assumed to have expired - throw
      * an appropriate {@link IOException}
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If the result is of the expected type, then cast and return it
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If the result is an {@link IOException} then re-throw it
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If the result is a {@link Throwable} then throw an {@link IOException}
      * whose cause is the original exception
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * Otherwise (should never happen), throw a {@link StreamCorruptedException}
      * with the name of the result type
-     * </LI>
+     * </P></LI>
      * </UL>
      *
+     * @param <R>          The generic result type
      * @param expectedType The expected result type
      * @param timeout      The timeout (millis) to wait for a result
      * @return The (never {@code null}) result
@@ -205,6 +209,8 @@ public class DefaultSshFuture<T extends SshFuture> extends AbstractLoggingBean i
 
     /**
      * Sets the result of the asynchronous operation, and mark it as finished.
+     *
+     * @param newValue The operation result
      */
     public void setValue(Object newValue) {
         synchronized (lock) {
@@ -221,7 +227,7 @@ public class DefaultSshFuture<T extends SshFuture> extends AbstractLoggingBean i
     }
 
     /**
-     * Returns the result of the asynchronous operation.
+     * @return The result of the asynchronous operation.
      */
     protected Object getValue() {
         synchronized (lock) {

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/future/SshFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/future/SshFuture.java b/sshd-core/src/main/java/org/apache/sshd/common/future/SshFuture.java
index 8963aae..bc9b9ce 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/future/SshFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/future/SshFuture.java
@@ -44,6 +44,8 @@ public interface SshFuture<T extends SshFuture> {
     /**
      * Wait for the asynchronous operation to complete with the specified timeout.
      *
+     * @param timeout   The number of time units to wait
+     * @param unit      The {@link TimeUnit} for waiting
      * @return {@code true} if the operation is completed.
      * @throws IOException if failed - specifically {@link java.io.InterruptedIOException}
      *                     if waiting was interrupted
@@ -53,6 +55,7 @@ public interface SshFuture<T extends SshFuture> {
     /**
      * Wait for the asynchronous operation to complete with the specified timeout.
      *
+     * @param timeoutMillis Wait time in milliseconds
      * @return {@code true} if the operation is completed.
      * @throws IOException if failed - specifically {@link java.io.InterruptedIOException}
      *                     if waiting was interrupted
@@ -64,7 +67,7 @@ public interface SshFuture<T extends SshFuture> {
      * The attached listeners will be notified when the operation is
      * completed.
      *
-     * @return the current IoFuture
+     * @return the current future
      */
     T awaitUninterruptibly();
 
@@ -72,6 +75,8 @@ public interface SshFuture<T extends SshFuture> {
      * Wait for the asynchronous operation to complete with the specified timeout
      * uninterruptibly.
      *
+     * @param timeout   The number of time units to wait
+     * @param unit      The {@link TimeUnit} for waiting
      * @return {@code true} if the operation is completed.
      */
     boolean awaitUninterruptibly(long timeout, TimeUnit unit);
@@ -80,12 +85,13 @@ public interface SshFuture<T extends SshFuture> {
      * Wait for the asynchronous operation to complete with the specified timeout
      * uninterruptibly.
      *
+     * @param timeoutMillis Wait time in milliseconds
      * @return {@code true} if the operation is finished.
      */
     boolean awaitUninterruptibly(long timeoutMillis);
 
     /**
-     * Returns if the asynchronous operation is completed.
+     * @return {@code true} if the asynchronous operation is completed.
      */
     boolean isDone();
 
@@ -93,12 +99,18 @@ public interface SshFuture<T extends SshFuture> {
      * Adds an event <tt>listener</tt> which is notified when
      * this future is completed. If the listener is added
      * after the completion, the listener is directly notified.
+     *
+     * @param listener The {@link SshFutureListener} instance to add
+     * @return The future instance
      */
     T addListener(SshFutureListener<T> listener);
 
     /**
      * Removes an existing event <tt>listener</tt> so it won't be notified when
      * the future is completed.
+     *
+     * @param listener The {@link SshFutureListener} instance to remove
+     * @return The future instance
      */
     T removeListener(SshFutureListener<T> listener);
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/io/IoConnectFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/IoConnectFuture.java b/sshd-core/src/main/java/org/apache/sshd/common/io/IoConnectFuture.java
index 50b2053..aefdd33 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/IoConnectFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/IoConnectFuture.java
@@ -22,6 +22,11 @@ import org.apache.sshd.common.future.SshFuture;
 
 public interface IoConnectFuture extends SshFuture<IoConnectFuture> {
 
+    /**
+     * @return The current {@link IoSession} - may be {@code null}
+     * if connect operation not finished yet or attempt has failed
+     * @see #getException()
+     */
     IoSession getSession();
 
     /**
@@ -29,16 +34,17 @@ public interface IoConnectFuture extends SshFuture<IoConnectFuture> {
      *
      * @return <tt>null</tt> if the connect operation is not finished yet,
      * or if the connection attempt is successful.
+     * @see #getSession()
      */
     Throwable getException();
 
     /**
-     * Returns <tt>true</tt> if the connect operation is finished successfully.
+     * @return <tt>true</tt> if the connect operation is finished successfully.
      */
     boolean isConnected();
 
     /**
-     * Returns {@code true} if the connect operation has been canceled by
+     * @return {@code true} if the connect operation has been canceled by
      * {@link #cancel()} method.
      */
     boolean isCanceled();
@@ -47,6 +53,8 @@ public interface IoConnectFuture extends SshFuture<IoConnectFuture> {
      * Sets the newly connected session and notifies all threads waiting for
      * this future.  This method is invoked by SSHD internally.  Please do not
      * call this method directly.
+     *
+     * @param session The connected {@link IoSession}
      */
     void setSession(IoSession session);
 
@@ -54,6 +62,8 @@ public interface IoConnectFuture extends SshFuture<IoConnectFuture> {
      * Sets the exception caught due to connection failure and notifies all
      * threads waiting for this future.  This method is invoked by SSHD
      * internally.  Please do not call this method directly.
+     *
+     * @param exception The caught {@link Throwable}
      */
     void setException(Throwable exception);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/io/IoInputStream.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/IoInputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/io/IoInputStream.java
index d61419c..0fdd011 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/IoInputStream.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/IoInputStream.java
@@ -25,6 +25,9 @@ public interface IoInputStream extends Closeable {
 
     /**
      * NOTE: the buffer must not be touched until the returned read future is completed.
+     *
+     * @param buffer the {@link Buffer} to use
+     * @return The {@link IoReadFuture} for the operation
      */
     IoReadFuture read(Buffer buffer);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/io/IoOutputStream.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/IoOutputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/io/IoOutputStream.java
index 104d5fb..0bf1c33 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/IoOutputStream.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/IoOutputStream.java
@@ -24,7 +24,10 @@ import org.apache.sshd.common.util.buffer.Buffer;
 public interface IoOutputStream extends Closeable {
 
     /**
-     * NOTE: the buffer must not be touched until the returned write future is completed.
+     * <B>NOTE:</B> the buffer must not be touched until the returned write future is completed.
+     *
+     * @param buffer the {@link Buffer} to use
+     * @return The {@link IoWriteFuture} for the operation
      */
     IoWriteFuture write(Buffer buffer);
 


[3/4] mina-sshd git commit: [SSHD-542] Checkstyle validation

Posted by lg...@apache.org.
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/io/IoSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/IoSession.java b/sshd-core/src/main/java/org/apache/sshd/common/io/IoSession.java
index 699e83e..2ea4333 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/IoSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/IoSession.java
@@ -27,7 +27,7 @@ import org.apache.sshd.common.util.buffer.Buffer;
 public interface IoSession extends Closeable {
 
     /**
-     * Returns a unique identifier for this session.  Every session has its own
+     * @return a unique identifier for this session.  Every session has its own
      * ID which is different from each other.
      */
     long getId();
@@ -50,12 +50,12 @@ public interface IoSession extends Closeable {
     Object setAttribute(Object key, Object value);
 
     /**
-     * Returns the socket address of remote peer.
+     * @return the socket address of remote peer.
      */
     SocketAddress getRemoteAddress();
 
     /**
-     * Returns the socket address of local machine which is associated with this
+     * @return the socket address of local machine which is associated with this
      * session.
      */
     SocketAddress getLocalAddress();
@@ -63,6 +63,9 @@ public interface IoSession extends Closeable {
     /**
      * Write a packet on the socket.
      * Multiple writes can be issued concurrently and will be queued.
+     *
+     * @param buffer The {@link Buffer} with the encoded packet data
+     * @return The {@link IoWriteFuture} for the request
      */
     IoWriteFuture write(Buffer buffer);
 
@@ -76,12 +79,13 @@ public interface IoSession extends Closeable {
      *                    The pending write requests will simply be discarded.
      *                    {@code false} to close this session after all queued
      *                    write requests are flushed.
+     * @return The generated {@link CloseFuture}
      */
     @Override
     CloseFuture close(boolean immediately);
 
     /**
-     * Returns the IoService that created this session.
+     * @return the {@link IoService} that created this session.
      */
     IoService getService();
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java b/sshd-core/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java
index a702621..033d615 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java
@@ -36,12 +36,12 @@ public interface IoWriteFuture extends SshFuture<IoWriteFuture> {
     void verify(long timeout) throws IOException;
 
     /**
-     * Returns <tt>true</tt> if the write operation is finished successfully.
+     * @return <tt>true</tt> if the write operation is finished successfully.
      */
     boolean isWritten();
 
     /**
-     * Returns the cause of the write failure if and only if the write
+     * @return the cause of the write failure if and only if the write
      * operation has failed due to an {@link Exception}.  Otherwise,
      * <tt>null</tt> is returned.
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/kex/KexProposalOption.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/kex/KexProposalOption.java b/sshd-core/src/main/java/org/apache/sshd/common/kex/KexProposalOption.java
index 2a01e64..250d3fe 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/kex/KexProposalOption.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/kex/KexProposalOption.java
@@ -43,7 +43,7 @@ public enum KexProposalOption {
     S2CLANG(Constants.PROPOSAL_LANG_STOC, "languages (server to client)");
 
     /**
-     * A {@link List} of all the options <U>sorted</U> according to {@link #getProposalIndex(){
+     * A {@link List} of all the options <U>sorted</U> according to {@link #getProposalIndex()}
      *
      * @see #BY_PROPOSAL_INDEX
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/kex/KeyExchange.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/kex/KeyExchange.java b/sshd-core/src/main/java/org/apache/sshd/common/kex/KeyExchange.java
index 9d052ac..0967287 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/kex/KeyExchange.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/kex/KeyExchange.java
@@ -60,21 +60,23 @@ public interface KeyExchange {
     Digest getHash();
 
     /**
-     * Retrieves the computed h parameter
+     * Retrieves the computed {@code h} parameter
      *
-     * @return
+     * @return The {@code h} parameter
      */
     byte[] getH();
 
     /**
      * Retrieves the computed k parameter
      *
-     * @return
+     * @return The {@code k} parameter
      */
     byte[] getK();
 
     /**
      * Retrieves the server's key
+     *
+     * @return The server's {@link PublicKey}
      */
     PublicKey getServerKey();
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/random/Random.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/random/Random.java b/sshd-core/src/main/java/org/apache/sshd/common/random/Random.java
index b4b4d7f..7b74ce3 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/random/Random.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/random/Random.java
@@ -44,6 +44,9 @@ public interface Random {
     /**
      * Returns a pseudo-random uniformly distributed {@code int}
      * in the half-open range [0, n).
+     *
+     * @param n The range upper limit
+     * @return The randomly selected value in the range
      */
     int random(int n);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractConnectionService.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractConnectionService.java b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractConnectionService.java
index 939d283..aae7abe 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractConnectionService.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractConnectionService.java
@@ -426,8 +426,8 @@ public abstract class AbstractConnectionService extends CloseableUtils.AbstractI
     /**
      * Process global requests
      *
-     * @param buffer the request
-     * @throws Exception
+     * @param buffer The request {@link Buffer}
+     * @throws Exception If failed to process the request
      */
     protected void globalRequest(Buffer buffer) throws Exception {
         String req = buffer.getString();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java
index ba4ac67..c032ec0 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/AbstractSession.java
@@ -75,12 +75,14 @@ import static org.apache.sshd.common.SshConstants.SSH_MSG_SERVICE_REQUEST;
 import static org.apache.sshd.common.SshConstants.SSH_MSG_UNIMPLEMENTED;
 
 /**
+ * <P>
  * The AbstractSession handles all the basic SSH protocol such as key exchange, authentication,
  * encoding and decoding. Both server side and client side sessions should inherit from this
  * abstract class. Some basic packet processing methods are defined but the actual call to these
  * methods should be done from the {@link #handleMessage(org.apache.sshd.common.util.buffer.Buffer)}
- * method, which is dependant on the state and side of this session.
- * <p/>
+ * method, which is dependent on the state and side of this session.
+ * </P>
+ *
  * TODO: if there is any very big packet, decoderBuffer and uncompressBuffer will get quite big
  * and they won't be resized down at any time. Though the packet size is really limited
  * by the channel max packet size
@@ -192,6 +194,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * Create a new session.
      *
+     * @param isServer       {@code true} if this is a server session, {@code false} if client one
      * @param factoryManager the factory manager
      * @param ioSession      the underlying MINA session
      */
@@ -222,7 +225,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * Retrieve the session from the MINA session.
      * If the session has not been attached and allowNull is <code>false</code>,
-     * an IllegalStateException will be thrown, else a {@code null} will
+     * an {@link IllegalStateException} will be thrown, else a {@code null} will
      * be returned
      *
      * @param ioSession the MINA session
@@ -232,7 +235,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
      */
     public static AbstractSession getSession(IoSession ioSession, boolean allowNull) {
         AbstractSession session = (AbstractSession) ioSession.getAttribute(SESSION);
-        if (!allowNull && session == null) {
+        if ((session == null) && (!allowNull)) {
             throw new IllegalStateException("No session available");
         }
         return session;
@@ -302,11 +305,13 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     }
 
     /**
-     * Main input point for the MINA framework.
-     * <p/>
+     * <P>Main input point for the MINA framework.</P>
+     *
+     * <P>
      * This method will be called each time new data is received on
      * the socket and will append it to the input buffer before
      * calling the {@link #decode()} method.
+     * </P>
      *
      * @param buffer the new buffer received
      * @throws Exception if an error occurs while decoding or handling the data
@@ -759,7 +764,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * Decode the incoming buffer and handle packets as needed.
      *
-     * @throws Exception
+     * @throws Exception If failed to decode
      */
     protected void decode() throws Exception {
         // Decoding loop
@@ -885,6 +890,8 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
      * string will be returned and the data read will be consumed from the buffer.
      *
      * @param buffer the buffer containing the identification string
+     * @param server {@code true} if it is called by the server session,
+     * {@code false} if by the client session
      * @return the remote identification or {@code null} if more data is needed
      */
     protected String doReadIdentification(Buffer buffer, boolean server) {
@@ -928,8 +935,8 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * Create our proposal for SSH negotiation
      *
-     * @param hostKeyTypes the list of supported host key types
-     * @return The proposal {@link Map>
+     * @param hostKeyTypes The comma-separated list of supported host key types
+     * @return The proposal {@link Map}
      */
     protected Map<KexProposalOption, String> createProposal(String hostKeyTypes) {
         Map<KexProposalOption, String> proposal = new EnumMap<>(KexProposalOption.class);
@@ -1497,7 +1504,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
      * Checks whether the session has timed out (both auth and idle timeouts are checked). If the session has
      * timed out, a DISCONNECT message will be sent.
      *
-     * @throws IOException
+     * @throws IOException If failed to check
      */
     protected void checkForTimeouts() throws IOException {
         if (!isClosing()) {
@@ -1521,7 +1528,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * Check if timeout has occurred.
      *
-     * @return
+     * @return The {@link TimeoutStatus}
      */
     @Override
     public TimeoutStatus getTimeoutStatus() {
@@ -1531,7 +1538,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * What is timeout value in milliseconds for authentication stage
      *
-     * @return
+     * @return The timeout value in milliseconds for authentication stage
      */
     @Override
     public long getAuthTimeout() {
@@ -1541,7 +1548,7 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     /**
      * What is timeout value in milliseconds for communication
      *
-     * @return
+     * @return The timeout value in milliseconds for communication
      */
     @Override
     public long getIdleTimeout() {
@@ -1552,5 +1559,4 @@ public abstract class AbstractSession extends CloseableUtils.AbstractInnerClosea
     public String toString() {
         return getClass().getSimpleName() + "[" + getUsername() + "@" + getIoSession().getRemoteAddress() + "]";
     }
-
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/session/ConnectionService.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/ConnectionService.java b/sshd-core/src/main/java/org/apache/sshd/common/session/ConnectionService.java
index c03eb14..4db9cc2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/ConnectionService.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/ConnectionService.java
@@ -42,14 +42,14 @@ public interface ConnectionService extends Service {
     /**
      * Remove this channel from the list of managed channels
      *
-     * @param channel the channel
+     * @param channel The {@link Channel} instance
      */
     void unregisterChannel(Channel channel);
 
     /**
      * Retrieve the tcpip forwarder
      *
-     * @return
+     * @return The {@link TcpipForwarder}
      */
     TcpipForwarder getTcpipForwarder();
 
@@ -60,5 +60,4 @@ public interface ConnectionService extends Service {
     String createX11Display(boolean singleConnection, String authenticationProtocol, String authenticationCookie, int screen) throws IOException;
 
     void setAllowMoreSessions(boolean allow);
-
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/session/Session.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/Session.java b/sshd-core/src/main/java/org/apache/sshd/common/session/Session.java
index fc5673a..d2ce89c 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/Session.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/Session.java
@@ -50,7 +50,8 @@ public interface Session extends Closeable {
     /**
      * Returns the value of the user-defined attribute of this session.
      *
-     * @param key the key of the attribute; must not be null.
+     * @param <T> The generic attribute type
+     * @param key The key of the attribute; must not be {@code null}.
      * @return <tt>null</tt> if there is no attribute with the specified key
      */
     <T> T getAttribute(AttributeKey<T> key);
@@ -58,9 +59,11 @@ public interface Session extends Closeable {
     /**
      * Sets a user-defined attribute.
      *
-     * @param key   the key of the attribute; must not be null.
-     * @param value the value of the attribute; must not be null.
-     * @return The old value of the attribute.  <tt>null</tt> if it is new.
+     * @param <T>   The generic attribute type
+     * @param <E>   The generic value type
+     * @param key   The key of the attribute; must not be {@code null}.
+     * @param value The value of the attribute; must not be {@code null}.
+     * @return The old value of the attribute.  {@code null} if it is new.
      */
     <T, E extends T> T setAttribute(AttributeKey<T> key, E value);
 
@@ -193,6 +196,9 @@ public interface Session extends Closeable {
 
     /**
      * Initiate a new key exchange.
+     *
+     * @return An {@link SshFuture} for awaiting the completion of the exchange
+     * @throws IOException If failed to negotiate keys
      */
     @SuppressWarnings("rawtypes")
     SshFuture reExchangeKeys() throws IOException;
@@ -202,21 +208,26 @@ public interface Session extends Closeable {
      * If the service is not of the specified class,
      * an IllegalStateException will be thrown.
      *
-     * @throws java.lang.IllegalStateException
+     * @param <T>   The generic service type
+     * @param clazz The service class
+     * @return The service instance
+     * @throws IllegalStateException If failed to find a matching service
      */
     <T extends Service> T getService(Class<T> clazz);
 
     /**
-     * Returns the IoSession associated to this ssh session
+     * @return the {@link IoSession} associated to this session
      */
     IoSession getIoSession();
 
     /**
+     * <P>
      * Type safe key for storage within the user attributes of {@link org.apache.sshd.common.session.AbstractSession}.
      * Typically it is used as a static variable that is shared between the producer
      * and the consumer. To further restrict access the setting or getting it from
      * the Session you can add static get and set methods, e.g:
-     * <p/>
+     * </P>
+     *
      * <pre>
      * private static final AttributeKey&lt;MyValue&gt; MY_KEY = new AttributeKey&lt;MyValue&gt;();
      *

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java b/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java
index e4e881c..4effca7 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/SessionListener.java
@@ -21,7 +21,7 @@ package org.apache.sshd.common.session;
 import java.util.EventListener;
 
 /**
- * Represents an interface receiving Session events.
+ * Represents an interface receiving session events.
  *
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
  */
@@ -34,22 +34,22 @@ public interface SessionListener extends EventListener {
     /**
      * A new session just been created
      *
-     * @param session
+     * @param session The created {@link Session}
      */
     void sessionCreated(Session session);
 
     /**
      * An event has been triggered
      *
-     * @param session
-     * @param event
+     * @param session The referenced {@link Session}
+     * @param event The generated {@link Event}
      */
     void sessionEvent(Session session, Event event);
 
     /**
      * A session has been closed
      *
-     * @param session
+     * @param session The closed {@link Session}
      */
     void sessionClosed(Session session);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/signature/BuiltinSignatures.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/signature/BuiltinSignatures.java b/sshd-core/src/main/java/org/apache/sshd/common/signature/BuiltinSignatures.java
index 0edf496..68a2105 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/signature/BuiltinSignatures.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/signature/BuiltinSignatures.java
@@ -224,7 +224,7 @@ public enum BuiltinSignatures implements SignatureFactory {
      *             if {@code null}/empty
      * @return A {@link ParseResult} of all the {@link NamedFactory} whose
      * name appears in the string and represent a built-in signature. Any
-     * unknown name is <U>ignored</I>. The order of the returned result
+     * unknown name is <U>ignored</U>. The order of the returned result
      * is the same as the original order - bar the unknown signatures.
      * <B>Note:</B> it is up to caller to ensure that the list does not
      * contain duplicates

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/ParserUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/ParserUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/ParserUtils.java
index 693d033..7768119 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/ParserUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/ParserUtils.java
@@ -41,7 +41,7 @@ import org.apache.sshd.common.util.ValidateUtils;
 
 /**
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH</A> section 3.4
+ * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH -  section 3.4</A>
  */
 public final class ParserUtils {
     public static final Collection<ExtensionParser<?>> BUILT_IN_PARSERS =

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/FsyncExtensionParser.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/FsyncExtensionParser.java b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/FsyncExtensionParser.java
index e8dbd38..d9c8b5e 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/FsyncExtensionParser.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/FsyncExtensionParser.java
@@ -21,7 +21,7 @@ package org.apache.sshd.common.subsystem.sftp.extensions.openssh;
 
 /**
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH</A> section 10
+ * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH -  section 10</A>
  */
 public class FsyncExtensionParser extends AbstractOpenSSHExtensionParser {
     public static final String NAME = "fsync@openssh.com";

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/HardLinkExtensionParser.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/HardLinkExtensionParser.java b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/HardLinkExtensionParser.java
index 2bbfb02..7e6264e 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/HardLinkExtensionParser.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/HardLinkExtensionParser.java
@@ -21,7 +21,7 @@ package org.apache.sshd.common.subsystem.sftp.extensions.openssh;
 
 /**
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH</A> section 10
+ * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH - section 10</A>
  */
 public class HardLinkExtensionParser extends AbstractOpenSSHExtensionParser {
     public static final String NAME = "hardlink@openssh.com";

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/PosixRenameExtensionParser.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/PosixRenameExtensionParser.java b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/PosixRenameExtensionParser.java
index 9871914..5ac949e 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/PosixRenameExtensionParser.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/PosixRenameExtensionParser.java
@@ -21,7 +21,7 @@ package org.apache.sshd.common.subsystem.sftp.extensions.openssh;
 
 /**
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH</A> section 3.3
+ * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH - section 3.3</A>
  */
 public class PosixRenameExtensionParser extends AbstractOpenSSHExtensionParser {
     public static final String NAME = "posix-rename@openssh.com";

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/StatVfsExtensionParser.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/StatVfsExtensionParser.java b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/StatVfsExtensionParser.java
index 83f4b03..bd86582 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/StatVfsExtensionParser.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/subsystem/sftp/extensions/openssh/StatVfsExtensionParser.java
@@ -21,7 +21,7 @@ package org.apache.sshd.common.subsystem.sftp.extensions.openssh;
 
 /**
  * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
- * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH</A> section 3.4
+ * @see <A HREF="https://github.com/openssh/openssh-portable/blob/master/PROTOCOL">OpenSSH - section 3.4</A>
  */
 public class StatVfsExtensionParser extends AbstractOpenSSHExtensionParser {
     public static final String NAME = "statvfs@openssh.com";

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/Base64.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/Base64.java b/sshd-core/src/main/java/org/apache/sshd/common/util/Base64.java
index 8b3b3cb..10e8684 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/Base64.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/Base64.java
@@ -22,8 +22,8 @@ import java.nio.charset.StandardCharsets;
 import java.security.InvalidParameterException;
 
 /**
- * Provides Base64 encoding and decoding as defined by RFC 2045.
- * <p/>
+ * <p>Provides Base64 encoding and decoding as defined by RFC 2045.</p>
+ *
  * <p>This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite>
  * from RFC 2045 <cite>Multipurpose Internet Mail Extensions (MIME) Part One:
  * Format of Internet Message Bodies</cite> by Freed and Borenstein.</p>
@@ -32,14 +32,12 @@ import java.security.InvalidParameterException;
  * @author <a href="http://mina.apache.org">Apache MINA Project</a>
  *         TODO replace this class with {@code java.util.Base64} when upgrading to JDK 1.8
  * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
- * <p/>
- * This class was
  */
 public class Base64 {
 
     /**
-     * Chunk size per RFC 2045 section 6.8.
-     * <p/>
+     * <P>Chunk size per RFC 2045 section 6.8.</P>
+     *
      * <p>The {@value} character limit does not count the trailing CRLF, but counts
      * all other characters, including any equal signs.</p>
      *
@@ -94,7 +92,7 @@ public class Base64 {
      */
     static final byte PAD = (byte) '=';
 
-    // Create arrays to hold the base64 characters and a 
+    // Create arrays to hold the base64 characters and a
     // lookup for base64 chars
     private static byte[] base64Alphabet = new byte[BASELENGTH];
 
@@ -244,8 +242,8 @@ public class Base64 {
             encodedDataLength = numberTriplets * 4;
         }
 
-        // If the output is to be "chunked" into 76 character sections, 
-        // for compliance with RFC 2045 MIME, then it is important to 
+        // If the output is to be "chunked" into 76 character sections,
+        // for compliance with RFC 2045 MIME, then it is important to
         // allow for extra length to account for the separator(s)
         if (isChunked) {
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/CloseableUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/CloseableUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/CloseableUtils.java
index 6b81aae..13874c2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/CloseableUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/CloseableUtils.java
@@ -401,11 +401,11 @@ public final class CloseableUtils {
         }
 
         /**
-         * doCloseImmediately is called once and only once
-         * with state == Immediate
-         * <p/>
-         * Overriding methods should always call the base implementation.
-         * It may be called concurrently while preClose() or doCloseGracefully is executing
+         * <P>doCloseImmediately is called once and only once
+         * with state == Immediate</P>
+         *
+         * <P>Overriding methods should always call the base implementation.
+         * It may be called concurrently while preClose() or doCloseGracefully is executing</P>
          */
         protected void doCloseImmediately() {
             closeFuture.setClosed();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/DirectoryScanner.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/DirectoryScanner.java b/sshd-core/src/main/java/org/apache/sshd/common/util/DirectoryScanner.java
index f6f9c14..19ed426 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/DirectoryScanner.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/DirectoryScanner.java
@@ -25,12 +25,12 @@ import java.util.List;
 /**
  * <p>Class for scanning a directory for files/directories which match certain
  * criteria.</p>
- * <p/>
+ *
  * <p>These criteria consist of selectors and patterns which have been specified.
  * With the selectors you can select which files you want to have included.
  * Files which are not selected are excluded. With patterns you can include
  * or exclude files based on their filename.</p>
- * <p/>
+ *
  * <p>The idea is simple. A given directory is recursively scanned for all files
  * and directories. Each file/directory is matched against a set of selectors,
  * including special support for matching against filenames with include and
@@ -38,12 +38,12 @@ import java.util.List;
  * pattern of the include pattern list or other file selector, and don't match
  * any pattern of the exclude pattern list or fail to match against a required
  * selector will be placed in the list of files/directories found.</p>
- * <p/>
+ *
  * <p>When no list of include patterns is supplied, "**" will be used, which
  * means that everything will be matched. When no list of exclude patterns is
  * supplied, an empty list is used, such that nothing will be excluded. When
  * no selectors are supplied, none are applied.</p>
- * <p/>
+ *
  * <p>The filename pattern matching is done as follows:
  * The name to be matched is split up in path segments. A path segment is the
  * name of a directory or file, which is bounded by
@@ -51,11 +51,11 @@ import java.util.List;
  * For example, "abc/def/ghi/xyz.java" is split up in the segments "abc",
  * "def","ghi" and "xyz.java".
  * The same is done for the pattern against which should be matched.</p>
- * <p/>
+ *
  * <p>The segments of the name and the pattern are then matched against each
  * other. When '**' is used for a path segment in the pattern, it matches
  * zero or more path segments of the name.</p>
- * <p/>
+ *
  * <p>There is a special case regarding the use of <code>File.separator</code>s
  * at the beginning of the pattern and the string to match:<br>
  * When a pattern starts with a <code>File.separator</code>, the string
@@ -64,12 +64,12 @@ import java.util.List;
  * string to match may not start with a <code>File.separator</code>.
  * When one of these rules is not obeyed, the string will not
  * match.</p>
- * <p/>
+ *
  * <p>When a name path segment is matched against a pattern path segment, the
  * following special characters can be used:<br>
  * '*' matches zero or more characters<br>
  * '?' matches one character.</p>
- * <p/>
+ *
  * <p>Examples:
  * <br>
  * <code>"**\*.class"</code> matches all <code>.class</code> files/dirs in a directory tree.
@@ -82,10 +82,10 @@ import java.util.List;
  * <code>"**\test\**\XYZ*"</code> matches all files/dirs which start with <code>"XYZ"</code> and where
  * there is a parent directory called test (e.g. <code>"abc\test\def\ghi\XYZ123"</code>).
  * </p>
- * <p/>
+ *
  * <p>Case sensitivity may be turned off if necessary. By default, it is
  * turned on.</p>
- * <p/>
+ *
  * <p>Example of usage:</p>
  * <pre>
  *   String[] includes = {"**\\*.class"};
@@ -182,7 +182,7 @@ public class DirectoryScanner {
      * <p>Sets the list of include patterns to use. All '/' and '\' characters
      * are replaced by <code>File.separatorChar</code>, so the separator used
      * need not match <code>File.separatorChar</code>.</p>
-     * <p/>
+     *
      * <p>When a pattern ends with a '/' or '\', "**" is appended.</p>
      *
      * @param includes A list of include patterns.
@@ -208,6 +208,7 @@ public class DirectoryScanner {
      * pattern and don't match any exclude patterns. If there are selectors
      * then the files must pass muster there, as well.
      *
+     * @return the matching files
      * @throws IllegalStateException if the base directory was set
      *                               incorrectly (i.e. if it is {@code null}, doesn't exist,
      *                               or isn't a directory).
@@ -347,7 +348,7 @@ public class DirectoryScanner {
     /**
      * <p>Replace a String with another String inside a larger String,
      * for the first <code>max</code> values of the search String.</p>
-     * <p/>
+     *
      * <p>A {@code null} reference passed to this method is a no-op.</p>
      *
      * @param text text to search and replace in

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/EventListenerUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/EventListenerUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/EventListenerUtils.java
index 48df9f4..774adf4 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/EventListenerUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/EventListenerUtils.java
@@ -38,18 +38,27 @@ public final class EventListenerUtils {
      * interface implementation. <b>Note:</b> a listener interface is one whose
      * invoked methods return <u>only</u> {@code void}.
      *
+     * @param <T>          Generic listener type
      * @param listenerType The expected listener <u>interface</u>
-     * @param listeners    An {@link Iterable} container of listeners to be invoked.</P>
+     * @param listeners    An {@link Iterable} container of listeners to be invoked.
+     *                     <p>
      *                     <b>Note(s):</b>
+     *                     </p>
      *                     <ul>
-     *                     <li>The invocation order is same as the {@link Iterable} container</li>
-     *                     <p/>
-     *                     <li>If any of the invoked listener methods throws an exception, the
+     *                     <li><p>
+     *                     The invocation order is same as the {@link Iterable} container
+     *                     </p></li>
+     *
+     *                     <li><p>
+     *                     If any of the invoked listener methods throws an exception, the
      *                     rest of the listener are <u>not</u> invoked and the exception is
-     *                     propagated to the caller</li>
-     *                     <p/>
-     *                     <li>It is up to the <u>caller</u> to ensure that the container does
-     *                     not change while the proxy is invoked</li>
+     *                     propagated to the caller
+     *                     </p></li>
+     *
+     *                     <li><p>
+     *                     It is up to the <u>caller</u> to ensure that the container does
+     *                     not change while the proxy is invoked
+     *                     </p></li>
      *                     </ul>
      * @return A proxy wrapper implementing the same interface, but delegating
      * the calls to the container
@@ -64,19 +73,28 @@ public final class EventListenerUtils {
      * interface implementation. <b>Note:</b> a listener interface is one whose
      * invoked methods return <u>only</u> {@code void}.
      *
+     * @param <T>          Generic listener type
      * @param listenerType The expected listener <u>interface</u>
      * @param loader       The {@link ClassLoader} to use for the proxy
-     * @param listeners    An {@link Iterable} container of listeners to be invoked.</P>
+     * @param listeners    An {@link Iterable} container of listeners to be invoked.
+     *                     <p>
      *                     <b>Note(s):</b>
+     *                     </p>
      *                     <ul>
-     *                     <li>The invocation order is same as the {@link Iterable} container</li>
-     *                     <p/>
-     *                     <li>If any of the invoked listener methods throws an exception, the
+     *                     <li><p>
+     *                     The invocation order is same as the {@link Iterable} container
+     *                     </p></li>
+     *
+     *                     <li><p>
+     *                     If any of the invoked listener methods throws an exception, the
      *                     rest of the listener are <u>not</u> invoked and the exception is
-     *                     propagated to the caller</li>
-     *                     <p/>
-     *                     <li>It is up to the <u>caller</u> to ensure that the container does
-     *                     not change while the proxy is invoked</li>
+     *                     propagated to the caller
+     *                     </p></li>
+     *
+     *                     <li><p>
+     *                     It is up to the <u>caller</u> to ensure that the container does
+     *                     not change while the proxy is invoked
+     *                     </p></li>
      *                     </ul>
      * @return A proxy wrapper implementing the same interface, but delegating
      * the calls to the container

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
index 8d17799..7cd4ef6 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
@@ -265,18 +265,19 @@ public final class GenericUtils {
 
     @SuppressWarnings({"unchecked", "rawtypes"})
     public static <V extends Comparable<V>> Comparator<V> naturalComparator() {
-        // TODO for JDK-8 use Comparator.naturalOrder() 
+        // TODO for JDK-8 use Comparator.naturalOrder()
         return (Comparator) NATURAL_ORDER_COMPARATOR;
     }
 
     public static <V extends Comparable<V>> SortedSet<V> asSortedSet(Collection<? extends V> values) {
-        // TODO for JDK-8 use Comparator.naturalOrder() 
+        // TODO for JDK-8 use Comparator.naturalOrder()
         return asSortedSet(GenericUtils.<V>naturalComparator(), values);
     }
 
     /**
+     * @param <V>    The element type
      * @param comp   The (non-{@code null}) {@link Comparator} to use
-     * @param values The values to be added (ignored if {@code null))
+     * @param values The values to be added (ignored if {@code null})
      * @return A {@link SortedSet} containing the values (if any) sorted
      * using the provided comparator
      */
@@ -356,6 +357,7 @@ public final class GenericUtils {
      * otherwise the new one is added as a <U>suppressed</U> exception to the
      * current one
      *
+     * @param <T>     The exception type
      * @param current The current exception
      * @param extra   The extra/new exception
      * @return The resolved exception

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/SelectorUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/SelectorUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/SelectorUtils.java
index e7319c8..8e6c98a 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/SelectorUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/SelectorUtils.java
@@ -61,7 +61,7 @@ public final class SelectorUtils {
     /**
      * <p>Tests whether or not a given path matches the start of a given
      * pattern up to the first "**".</p>
-     * <p/>
+     *
      * <p>This is not a general purpose test and should only be used if you
      * can live with false positives. For example, <code>pattern=**\a</code>
      * and <code>str=b</code> will yield <code>true</code>.</p>
@@ -80,7 +80,7 @@ public final class SelectorUtils {
     /**
      * <p>Tests whether or not a given path matches the start of a given
      * pattern up to the first "**".</p>
-     * <p/>
+     *
      * <p>This is not a general purpose test and should only be used if you
      * can live with false positives. For example, <code>pattern=**\a</code>
      * and <code>str=b</code> will yield <code>true</code>.</p>
@@ -571,7 +571,7 @@ public final class SelectorUtils {
 
         if (GenericUtils.isEmpty(tokens)) {
             if (removedDots > 0) {
-                return "";  // had some "." and ".." after which we remained with no path 
+                return "";  // had some "." and ".." after which we remained with no path
             } else {
                 return separator;   // it was all separators
             }
@@ -623,7 +623,7 @@ public final class SelectorUtils {
      * @see #translateToFileSystemPath(String, String, String)
      */
     public static String translateToLocalFileSystemPath(String path, char pathSeparator, String fsSeparator) {
-        // In case double slashes and other patterns are used 
+        // In case double slashes and other patterns are used
         String slashified = applySlashifyRules(path, pathSeparator);
         // In case we are running on Windows
         String localPath = translateToLocalPath(slashified);
@@ -643,20 +643,20 @@ public final class SelectorUtils {
         if (GenericUtils.isEmpty(path)) {
             return path;
         }
-        
+
         int curPos = path.indexOf(sepChar);
         if (curPos < 0) {
             return path;    // no slashes to handle
         }
-        
+
         int lastPos = 0;
         StringBuilder sb = null;
         while (curPos < path.length()) {
             curPos++;   // skip the 1st '/'
-            
+
             /*
              * As per Single Unix Specification version 3, section 3.266:
-             * 
+             *
              *      Multiple successive slashes are considered to be the
              *      same as one slash
              */
@@ -664,7 +664,7 @@ public final class SelectorUtils {
             while ((nextPos < path.length()) && (path.charAt(nextPos) == sepChar)) {
                 nextPos++;
             }
-            
+
             /*
              * At this stage, nextPos is the first non-slash character after a
              * possibly 'seqLen' sequence of consecutive slashes.
@@ -674,19 +674,19 @@ public final class SelectorUtils {
                 if (sb == null) {
                     sb = new StringBuilder(path.length() - seqLen);
                 }
-                
+
                 if (lastPos < curPos) {
                     String clrText = path.substring(lastPos, curPos);
                     sb.append(clrText);
                 }
-                
+
                 lastPos = nextPos;
             }
-            
+
             if (nextPos >= path.length()) {
                 break;  // no more data
             }
-            
+
             curPos = path.indexOf(sepChar, nextPos);
             if (curPos < nextPos) {
                 break;  // no more slashes
@@ -699,14 +699,14 @@ public final class SelectorUtils {
                 String clrText = path.substring(lastPos);
                 sb.append(clrText);
             }
-            
+
             path = sb.toString();
         }
 
         /*
          * At this point we know for sure that 'path' contains only SINGLE
          * slashes. According to section 4.11 - Pathname resolution
-         * 
+         *
          *      A pathname that contains at least one non-slash character
          *      and that ends with one or more trailing slashes shall be
          *      resolved as if a single dot character ( '.' ) were appended
@@ -779,7 +779,7 @@ public final class SelectorUtils {
     public static String translateToFileSystemPath(String path, String pathSeparator, FileSystem fs) {
         return translateToFileSystemPath(path, pathSeparator, ValidateUtils.checkNotNull(fs, "No target file system").getSeparator());
     }
-    
+
     /**
      * Converts a path containing a specific separator to one using the
      * specified file-system one

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java b/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
index 1595a79..6a33c3b 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
@@ -186,8 +186,8 @@ public abstract class Buffer implements Readable {
      *                           data available
      * @param charset            The {@link Charset} to use for the string
      * @return A {@link Collection} of the read strings
-     * @see {@link #getStringList(int, Charset)}
-     * @see {@link #getAvailableStrings()}
+     * @see #getStringList(int, Charset)
+     * @see #getAvailableStrings()
      */
     public Collection<String> getStringList(boolean usePrependedLength, Charset charset) {
         if (usePrependedLength) {
@@ -223,7 +223,7 @@ public abstract class Buffer implements Readable {
     }
 
     /**
-     * @param count The <U>exact</V> number of strings to read - can be zero
+     * @param count The <U>exact</U> number of strings to read - can be zero
      * @return A {@link List} with the specified number of strings
      * @see #getStringList(int, Charset)
      */
@@ -232,9 +232,10 @@ public abstract class Buffer implements Readable {
     }
 
     /**
-     * @param count   The <U>exact</V> number of strings to read - can be zero
+     * @param count   The <U>exact</U> number of strings to read - can be zero
      * @param charset The {@link Charset} of the strings
      * @return A {@link List} with the specified number of strings
+     * @see #getString(Charset)
      */
     public List<String> getStringList(int count, Charset charset) {
         if (count == 0) {
@@ -438,7 +439,7 @@ public abstract class Buffer implements Readable {
     /**
      * Writes 16 bits
      *
-     * @param i
+     * @param i The 16-bit value
      */
     public void putShort(int i) {
         // TODO use Short.BYTES for JDK-8
@@ -463,7 +464,7 @@ public abstract class Buffer implements Readable {
     /**
      * Writes 64 bits
      *
-     * @param i
+     * @param i The 64-bit value
      */
     public void putLong(long i) {
         // TODO use Long.BYTES for JDK-8

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
index dfc9f0b..02a800a 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java
@@ -190,8 +190,9 @@ public final class BufferUtils {
     /**
      * Writes a 32-bit value in network order (i.e., MSB 1st)
      *
-     * @param value The 32-bit value
-     * @param buf   A work buffer to use - must have enough space to contain 4 bytes
+     * @param output The {@link OutputStream} to write the value
+     * @param value  The 32-bit value
+     * @param buf    A work buffer to use - must have enough space to contain 4 bytes
      * @throws IOException If failed to write the value or work buffer to small
      * @see #writeInt(OutputStream, int, byte[], int, int)
      */
@@ -202,10 +203,11 @@ public final class BufferUtils {
     /**
      * Writes a 32-bit value in network order (i.e., MSB 1st)
      *
-     * @param value The 32-bit value
-     * @param buf   A work buffer to use - must have enough space to contain 4 bytes
-     * @param off   The offset to write the value
-     * @param len   The available space
+     * @param output The {@link OutputStream} to write the value
+     * @param value  The 32-bit value
+     * @param buf    A work buffer to use - must have enough space to contain 4 bytes
+     * @param off    The offset to write the value
+     * @param len    The available space
      * @throws IOException If failed to write the value or work buffer to small
      * @see #writeUInt(OutputStream, long, byte[], int, int)
      */
@@ -216,8 +218,9 @@ public final class BufferUtils {
     /**
      * Writes a 32-bit value in network order (i.e., MSB 1st)
      *
-     * @param value The 32-bit value
-     * @param buf   A work buffer to use - must have enough space to contain 4 bytes
+     * @param output The {@link OutputStream} to write the value
+     * @param value  The 32-bit value
+     * @param buf    A work buffer to use - must have enough space to contain 4 bytes
      * @throws IOException If failed to write the value or work buffer to small
      * @see #writeUInt(OutputStream, long, byte[], int, int)
      */
@@ -228,10 +231,11 @@ public final class BufferUtils {
     /**
      * Writes a 32-bit value in network order (i.e., MSB 1st)
      *
-     * @param value The 32-bit value
-     * @param buf   A work buffer to use - must have enough space to contain 4 bytes
-     * @param off   The offset to write the value
-     * @param len   The available space
+     * @param output The {@link OutputStream} to write the value
+     * @param value  The 32-bit value
+     * @param buf    A work buffer to use - must have enough space to contain 4 bytes
+     * @param off    The offset to write the value
+     * @param len    The available space
      * @throws IOException If failed to write the value or work buffer to small
      * @see #putUInt(long, byte[], int, int)
      */
@@ -339,7 +343,7 @@ public final class BufferUtils {
     }
 
     /**
-     * Updates a 32-bit &quot;placeholder&quot location for data length - moves
+     * Updates a 32-bit &quot;placeholder&quot; location for data length - moves
      * the write position to the specified placeholder position, updates the length
      * value and then moves the write position it back to its original value.
      *
@@ -359,6 +363,7 @@ public final class BufferUtils {
     /**
      * Invokes {@link Buffer#clear()}
      *
+     * @param <B>    The generic buffer type
      * @param buffer A {@link Buffer} instance - ignored if {@code null}
      * @return The same as the input instance
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/io/DERParser.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/io/DERParser.java b/sshd-core/src/main/java/org/apache/sshd/common/util/io/DERParser.java
index c72b1db..a4f10fd 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/io/DERParser.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/io/DERParser.java
@@ -65,22 +65,22 @@ public class DERParser extends FilterInputStream {
      * encoding up to 4 octets. In BER/DER encoding, length can
      * be encoded in 2 forms:
      * <ul>
-     * <li>
+     * <li><p>
      * Short form - One octet. Bit 8 has value "0" and bits 7-1
      * give the length.
-     * </li>
-     * <p/>
-     * <li>
+     * </p></li>
+     *
+     * <li><p>
      * Long form - Two to 127 octets (only 4 is supported here).
      * Bit 8 of first octet has value "1" and bits 7-1 give the
      * number of additional length octets. Second and following
      * octets give the length, base 256, most significant digit
      * first.
-     * </li>
+     * </p></li>
      * </ul>
      *
      * @return The length as integer
-     * @throws IOException
+     * @throws IOException If invalid format found
      */
     public int readLength() throws IOException {
         int i = read();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/io/IoUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/io/IoUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/io/IoUtils.java
index 6eb8c4c..3d66f72 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/io/IoUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/io/IoUtils.java
@@ -121,7 +121,8 @@ public final class IoUtils {
      * {@link Files#getPosixFilePermissions(Path, LinkOption...)}, otherwise
      * uses the {@link #getPermissionsFromFile(File)} method
      *
-     * @param path The {@link Path}
+     * @param path    The {@link Path}
+     * @param options The {@link LinkOption}s to use when querying the permissions
      * @return A {@link Set} of {@link PosixFilePermission}
      * @throws IOException If failed to access the file system in order to
      *                     retrieve the permissions
@@ -213,7 +214,8 @@ public final class IoUtils {
     /**
      * <P>Checks if a file exists - <B>Note:</B> according to the
      * <A HREF="http://docs.oracle.com/javase/tutorial/essential/io/check.html">Java tutorial - Checking a File or Directory</A>:
-     * </P></BR>
+     * </P>
+     *
      * <PRE>
      * The methods in the Path class are syntactic, meaning that they operate
      * on the Path instance. But eventually you must access the file system
@@ -221,11 +223,11 @@ public final class IoUtils {
      * so with the exists(Path, LinkOption...) and the notExists(Path, LinkOption...)
      * methods. Note that !Files.exists(path) is not equivalent to Files.notExists(path).
      * When you are testing a file's existence, three results are possible:
-     * <p/>
+     *
      * - The file is verified to exist.
      * - The file is verified to not exist.
      * - The file's status is unknown.
-     * <p/>
+     *
      * This result can occur when the program does not have access to the file.
      * If both exists and notExists return false, the existence of the file cannot
      * be verified.
@@ -264,7 +266,7 @@ public final class IoUtils {
      * @param input  where to read input from
      * @param buffer destination
      * @param offset initial offset into buffer
-     * @param length length to read, must be >= 0
+     * @param length length to read, must be &ge; 0
      * @throws IOException  if there is a problem reading the file
      * @throws EOFException if the number of bytes read was incorrect
      */
@@ -313,7 +315,7 @@ public final class IoUtils {
 
     /**
      * @param perms    The current {@link PosixFilePermission}s - ignored if {@code null}/empty
-     * @param excluded The permissions <U>not</U> allowed to exist - ignored if {@code null)/empty
+     * @param excluded The permissions <U>not</U> allowed to exist - ignored if {@code null}/empty
      * @return The violating {@link PosixFilePermission} - {@code null}
      * if no violating permission found
      */

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/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 b391e9d..5230fe3 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
@@ -39,28 +39,30 @@ public final class LoggingUtils {
      * @param level     The {@link Level} to evaluate
      * @param threshold The threshold {@link Level}
      * @return {@code true} if the evaluated level is above the required
-     * threshold.</BR>
-     * <P><B>Note(s):</B></BR></P>
-     * <P><UL>
-     * <LI>
+     * threshold.
+     * <P>
+     * <B>Note(s):</B>
+     * </P>
+     * <UL>
+     * <LI><P>
      * If either argument is {@code null} then result is {@code false}.
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If the evaluated level is {@link Level#OFF} then result is {@code false}
      * regardless of the threshold.
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If the threshold is {@link Level#ALL} and the evaluated level is
      * <U>not</U> {@link Level#OFF} the result is {@code true}.
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * Otherwise, the evaluated level {@link Level#intValue()} must be
      * greater or equal to the threshold.
-     * </LI>
-     * </UL></P>
+     * </P></LI>
+     * </UL>
      */
     public static boolean isLoggable(Level level, Level threshold) {
         if ((level == null) || (threshold == null)) {
@@ -116,7 +118,7 @@ public final class LoggingUtils {
      * @param logger The {@link Logger} instance - ignored if {@code null}
      * @param level  The validate log {@link Level} - ignored if {@code null}
      * @return <P>{@code true} if the level is enabled for the logger. The
-     * mapping of the level to the logger is as follows:</P></BR>
+     * mapping of the level to the logger is as follows:</P>
      * <UL>
      * <LI>{@link Level#OFF} always returns {@code false}</LI>
      * <LI>{@link Level#SEVERE} returns {@link Logger#isErrorEnabled()}</LI>

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java
index f20e8e3..de37cf7 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java
@@ -92,20 +92,20 @@ public final class ThreadUtils {
     }
 
     /**
-     * Attempts to find the most suitable {@link ClassLoader} as follows:</BR>
+     * <P>Attempts to find the most suitable {@link ClassLoader} as follows:</P>
      * <UL>
-     * <LI>
+     * <LI><P>
      * Check the {@link Thread#getContextClassLoader()} value
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If no thread context class loader then check the anchor
      * class (if given) for its class loader
-     * </LI>
-     * <p/>
-     * <LI>
+     * </P></LI>
+     *
+     * <LI><P>
      * If still no loader available, then use {@link ClassLoader#getSystemClassLoader()}
-     * </LI>
+     * </P></LI>
      * </UL>
      *
      * @param anchor The anchor {@link Class} to use if no current thread

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/AsyncCommand.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/AsyncCommand.java b/sshd-core/src/main/java/org/apache/sshd/server/AsyncCommand.java
index 37369a7..c28649c 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/AsyncCommand.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/AsyncCommand.java
@@ -31,21 +31,21 @@ public interface AsyncCommand extends Command {
     /**
      * Set the input stream that can be used by the shell to read input.
      *
-     * @param in
+     * @param in The {@link IoInputStream} used by the shell to read input
      */
     void setIoInputStream(IoInputStream in);
 
     /**
      * Set the output stream that can be used by the shell to write its output.
      *
-     * @param out
+     * @param out The {@link IoOutputStream} used by the shell to write its output
      */
     void setIoOutputStream(IoOutputStream out);
 
     /**
      * Set the error stream that can be used by the shell to write its errors.
      *
-     * @param err
+     * @param err The {@link IoOutputStream} used by the shell to write its errors
      */
     void setIoErrorStream(IoOutputStream err);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/Command.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/Command.java b/sshd-core/src/main/java/org/apache/sshd/server/Command.java
index ade5065..784884c 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/Command.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/Command.java
@@ -23,11 +23,15 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 /**
+ * <p>
  * Represents a command, shell or subsystem that can be used to send command.
- * <p/>
+ * </p>
+ *
+ * <p>
  * This command have direct streams, meaning those streams will be provided by the ssh server
- * for the shell to use directy. This interface is suitable for implementing commands in java,
+ * for the shell to use directly. This interface is suitable for implementing commands in java,
  * rather than using external processes.  For wrapping such processes or using inverted streams,
+ * </p>
  * see {@link org.apache.sshd.server.shell.InvertedShellWrapper}.
  */
 public interface Command {
@@ -35,28 +39,28 @@ public interface Command {
     /**
      * Set the input stream that can be used by the shell to read input.
      *
-     * @param in
+     * @param in The {@link InputStream}  used by the shell to read input.
      */
     void setInputStream(InputStream in);
 
     /**
      * Set the output stream that can be used by the shell to write its output.
      *
-     * @param out
+     * @param out The {@link OutputStream} used by the shell to write its output
      */
     void setOutputStream(OutputStream out);
 
     /**
      * Set the error stream that can be used by the shell to write its errors.
      *
-     * @param err
+     * @param err The {@link OutputStream} used by the shell to write its errors
      */
     void setErrorStream(OutputStream err);
 
     /**
      * Set the callback that the shell has to call when it is closed.
      *
-     * @param callback
+     * @param callback The {@link ExitCallback} to call when shell is closed
      */
     void setExitCallback(ExitCallback callback);
 
@@ -71,8 +75,8 @@ public interface Command {
      * }
      * </pre>
      *
-     * @param env
-     * @throws java.io.IOException
+     * @param env The {@link Environment}
+     * @throws IOException If failed to start
      */
     void start(Environment env) throws IOException;
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/CommandFactory.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/CommandFactory.java b/sshd-core/src/main/java/org/apache/sshd/server/CommandFactory.java
index 053cdfe..2fb2a86 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/CommandFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/CommandFactory.java
@@ -32,8 +32,8 @@ public interface CommandFactory {
      * If the command is not known, a dummy command should be returned to allow
      * the display output to be sent back to the client.
      *
-     * @param command
-     * @return a non null <code>Command</code>
+     * @param command The command that will be run
+     * @return a non {@code null} {@link Command} instance
      */
     Command createCommand(String command);
 

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/SignalListener.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/SignalListener.java b/sshd-core/src/main/java/org/apache/sshd/server/SignalListener.java
index b9dab23..6904543 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/SignalListener.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/SignalListener.java
@@ -24,7 +24,7 @@ package org.apache.sshd.server;
 public interface SignalListener {
 
     /**
-     * @param signal
+     * @param signal The received {@link Signal}
      */
     void signal(Signal signal);
 }

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/SshServer.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/SshServer.java b/sshd-core/src/main/java/org/apache/sshd/server/SshServer.java
index 98ad760..e492855 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/SshServer.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/SshServer.java
@@ -66,8 +66,11 @@ import org.apache.sshd.server.shell.ProcessShellFactory;
 import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
 
 /**
+ * <p>
  * The SshServer class is the main entry point for the server side of the SSH protocol.
- * <p/>
+ * </p>
+ *
+ * <p>
  * The SshServer has to be configured before being started.  Such configuration can be
  * done either using a dependency injection mechanism (such as the Spring framework)
  * or programmatically. Basic setup is usually done using the {@link #setUpDefaultServer()}
@@ -75,10 +78,13 @@ import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
  * Besides this basic setup, a few things have to be manually configured such as the
  * port number, {@link Factory}, the {@link org.apache.sshd.common.keyprovider.KeyPairProvider}
  * and the {@link PasswordAuthenticator}.
- * <p/>
+ * </p>
+ *
+ * <p>
  * Some properties can also be configured using the {@link #setProperties(java.util.Map)}
  * method.
- * <p/>
+ * </p>
+ *
  * Once the SshServer instance has been configured, it can be started using the
  * {@link #start()} method and stopped using the {@link #stop()} method.
  *
@@ -263,7 +269,7 @@ public class SshServer extends AbstractFactoryManager implements ServerFactoryMa
     /**
      * Start the SSH server and accept incoming exceptions on the configured port.
      *
-     * @throws IOException
+     * @throws IOException If failed to start
      */
     public void start() throws IOException {
         checkConfig();
@@ -307,6 +313,7 @@ public class SshServer extends AbstractFactoryManager implements ServerFactoryMa
 
     /**
      * Stop the SSH server.  This method will block until all resources are actually disposed.
+     * @throws IOException if stopping failed somehow
      */
     public void stop() throws IOException {
         stop(false);
@@ -351,6 +358,8 @@ public class SshServer extends AbstractFactoryManager implements ServerFactoryMa
 
     /**
      * Obtain the list of active sessions.
+     *
+     * @return A {@link List} of the currently active session
      */
     public List<AbstractSession> getActiveSessions() {
         List<AbstractSession> sessions = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuth.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuth.java b/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuth.java
index 8ee4e1d..6da8319 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuth.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuth.java
@@ -30,13 +30,14 @@ public interface UserAuth {
 
     /**
      * Try to authenticate the user.
-     * This methods should return a non null object which is the user identity if
+     * This methods should return a non {@code null} object which is the user identity if
      * the authentication succeeded.  If the authentication failed, this method should
      * throw an exception.  If the authentication is still ongoing, a null value should
      * be returned.
      *
      * @param session  the current ssh session
      * @param username the user trying to log in
+     * @param service  the requested service name
      * @param buffer   the request buffer containing parameters specific to this request
      * @return <code>true</code> if the authentication succeeded, <code>false</code> if the authentication
      * failed and {@code null} if not finished yet

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuthPassword.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuthPassword.java b/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuthPassword.java
index a7923a2..6af7f08 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuthPassword.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/auth/UserAuthPassword.java
@@ -38,7 +38,7 @@ public class UserAuthPassword extends AbstractUserAuth {
     @Override
     public Boolean doAuth(Buffer buffer, boolean init) throws Exception {
         if (!init) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Incomplete initialization");
         }
         boolean newPassword = buffer.getBoolean();
         if (newPassword) {

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/auth/gss/UserAuthGSS.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/auth/gss/UserAuthGSS.java b/sshd-core/src/main/java/org/apache/sshd/server/auth/gss/UserAuthGSS.java
index 95e8c15..f3b5762 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/auth/gss/UserAuthGSS.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/auth/gss/UserAuthGSS.java
@@ -36,7 +36,7 @@ import org.ietf.jgss.Oid;
 /**
  * <p>Prototype user authentication handling gssapi-with-mic.  Implements <code>HandshakingUserAuth</code> because
  * the process involves several steps.</p>
- * <p/>
+ *
  * <p>Several methods are available for overriding in specific circumstances.</p>
  */
 public class UserAuthGSS extends AbstractUserAuth {
@@ -205,7 +205,7 @@ public class UserAuthGSS extends AbstractUserAuth {
      * Utility to get the configured GSS authenticator for the server, throwing an exception if none is available.
      *
      * @param session The current {@link ServerSession}
-     * @return The {@link GSSAuthenticator} - never {@code null)
+     * @return The {@link GSSAuthenticator} - never {@code null}
      * @throws Exception If no GSS authenticator is defined
      */
     protected GSSAuthenticator getAuthenticator(ServerSession session) throws Exception {

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/channel/AbstractServerChannel.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/channel/AbstractServerChannel.java b/sshd-core/src/main/java/org/apache/sshd/server/channel/AbstractServerChannel.java
index f87c4ea..adc3e57 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/channel/AbstractServerChannel.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/channel/AbstractServerChannel.java
@@ -44,21 +44,21 @@ public abstract class AbstractServerChannel extends AbstractChannel {
     }
 
     @Override
-    public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer) {
+    public OpenFuture open(int recipient, int rwSize, int packetSize, Buffer buffer) {
         this.recipient = recipient;
-        this.remoteWindow.init(rwsize, rmpsize, session.getFactoryManager().getProperties());
+        this.remoteWindow.init(rwSize, packetSize, session.getFactoryManager().getProperties());
         configureWindow();
         return doInit(buffer);
     }
 
     @Override
-    public void handleOpenSuccess(int recipient, int rwsize, int rmpsize, Buffer buffer) throws IOException {
-        throw new IllegalStateException();
+    public void handleOpenSuccess(int recipient, int rwSize, int packetSize, Buffer buffer) throws IOException {
+        throw new UnsupportedOperationException("handleOpenSuccess(" + recipient + "," + rwSize + "," + packetSize + ") N/A");
     }
 
     @Override
     public void handleOpenFailure(Buffer buffer) {
-        throw new IllegalStateException();
+        throw new UnsupportedOperationException("handleOpenFailure() N/A");
     }
 
     protected OpenFuture doInit(Buffer buffer) {

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelDataReceiver.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelDataReceiver.java b/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelDataReceiver.java
index 79f4e15..2ff6258 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelDataReceiver.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelDataReceiver.java
@@ -22,9 +22,11 @@ import java.io.Closeable;
 import java.io.IOException;
 
 /**
+ * <p>
  * Receiving end of the data stream from the client.
- * <p/>
- * <p/>
+ * </p>
+ *
+ * <p>
  * Sequence of bytes that SSH client sends to the server is eventually sent to this interface
  * to be passed on to the final consumer.
  * By default {@link ChannelSession} spools this in a buffer so that you can read it from
@@ -33,21 +35,25 @@ import java.io.IOException;
  * call {@link ChannelSession#setDataReceiver(ChannelDataReceiver)} to do so.
  * (And to grab a reference to {@link ChannelSession}, a {@link org.apache.sshd.server.Command} should implement
  * {@link org.apache.sshd.server.ChannelSessionAware}.)
+ * </p>
  *
  * @see ChannelSession#setDataReceiver(ChannelDataReceiver)
  * @see org.apache.sshd.server.ChannelSessionAware
  */
 public interface ChannelDataReceiver extends Closeable {
     /**
+     * <p>
      * Called when the server receives additional bytes from the client.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * SSH channels use the windowing mechanism to perform flow control, much like TCP does.
      * The server gives the client the initial window size, which represents the number of
      * bytes the client can send to the server. As the server receives data, it can
      * send a message to the client to allow it to send more data.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * The return value from this method is used to control this behaviour.
      * Intuitively speaking, the callee returns the number of bytes consumed by this method,
      * by the time this method returns. Picture a one-way long bridge (for example Golden Gate Bridge)
@@ -56,30 +62,36 @@ public interface ChannelDataReceiver extends Closeable {
      * count the number of cars as it leaves the bridge, and if enough of them left,
      * we'll signal the sending end that they can let in more cars. The return value of this
      * method counts the number of cars that are leaving in this batch.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * In simple cases, where the callee has consumed the bytes before it returns,
      * the return value must be the same value as the 'len' parameter given.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * On the other hand, if the callee is queueing up the received bytes somewhere
      * to be consumed later (for example by another thread), then this method should
      * return 0, for the bytes aren't really consumed yet. And when at some later point
      * the bytes are actually used, then you'll invoke {@code channel.getLocalWindow().consumeAndCheck(len)}
      * to let the channel know that bytes are consumed.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * This behaviour will result in a better flow control, as the server will not
      * allow the SSH client to overflow its buffer. If instead you always return the value
      * passed in the 'len' parameter, the place where you are queueing up bytes may overflow.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * In either case, the callee must account for every bytes it receives in this method.
      * Returning 0 and failing to call back {@code channel.getLocalWindow().consumeAndCheck(len)} later
      * will dry up the window size, and eventually the client will stop sending you any data.
-     * <p/>
-     * <p/>
+     * </p>
+     *
+     * <p>
      * In the SSH protocol, this method invocation is triggered by a <tt>SSH_MSG_CHANNEL_DATA</tt> message.
+     * </p>
      *
      * @param channel The caller to which this {@link ChannelDataReceiver} is assigned. Never null.
      * @param buf     Holds the bytes received. This buffer belongs to the caller, and it might get reused
@@ -89,13 +101,14 @@ public interface ChannelDataReceiver extends Closeable {
      * @return The number of bytes consumed, for the purpose of the flow control.
      * For a simple use case, you return the value given by the 'len' parameter.
      * See the method javadoc for more details.
+     * @throws IOException if failed to consume the data
      */
     int data(ChannelSession channel, byte[] buf, int start, int len) throws IOException;
 
     /**
-     * Called to indicate EOF.
-     * <p/>
-     * The client will no longer send us any more data.
+     * Called to indicate EOF. The client will no longer send us any more data.
+     *
+     * @throws IOException if failed
      */
     @Override
     void close() throws IOException;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java b/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
index ec28980..eb326b9 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
@@ -524,6 +524,8 @@ public class ChannelSession extends AbstractServerChannel {
      * will no longer be invoked. If you call this method from {@link Command#start(Environment)},
      * the input stream you received in {@link Command#setInputStream(java.io.InputStream)} will
      * not read any data.
+     *
+     * @param receiver The {@link ChannelDataReceiver} instance
      */
     public void setDataReceiver(ChannelDataReceiver receiver) {
         this.receiver = receiver;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/config/keys/ServerIdentity.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/config/keys/ServerIdentity.java b/sshd-core/src/main/java/org/apache/sshd/server/config/keys/ServerIdentity.java
index f1d424d..a261986 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/config/keys/ServerIdentity.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/config/keys/ServerIdentity.java
@@ -71,6 +71,7 @@ public final class ServerIdentity {
     /**
      * Sets the server's {@link KeyPairProvider} with the loaded identities - if any
      *
+     * @param <S>           The generic server type
      * @param server        The {@link SshServer} to configure
      * @param props         The {@link Properties} holding the server's configuration - ignored
      *                      if {@code null}/empty
@@ -131,7 +132,7 @@ public final class ServerIdentity {
      *                if {@code null}/empty
      * @param options The {@link LinkOption}s to use when checking files existence
      * @return A {@link Map} of the found identities where key=the identity type
-     * (case <U>insensitive</I>) and value=the {@link Path} of the file holding
+     * (case <U>insensitive</U>) and value=the {@link Path} of the file holding
      * the specific type key
      * @throws IOException If failed to access the file system
      * @see #getIdentityType(String)

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/forward/ForwardingFilter.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/forward/ForwardingFilter.java b/sshd-core/src/main/java/org/apache/sshd/server/forward/ForwardingFilter.java
index 9bea393..57ed0ee 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/forward/ForwardingFilter.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/forward/ForwardingFilter.java
@@ -34,11 +34,15 @@ import org.apache.sshd.common.util.GenericUtils;
  */
 public interface ForwardingFilter {
     /**
+     * <p>
      * Determine if the session may arrange for agent forwarding.
-     * <p/>
+     * </p>
+     *
+     * <p>
      * This server process will open a new listen socket locally and export
      * the address in the {@link org.apache.sshd.agent.SshAgent#SSH_AUTHSOCKET_ENV_NAME} environment
      * variable.
+     * </p>
      *
      * @param session session requesting permission to forward the agent.
      * @return true if the agent forwarding is permitted, false if denied.
@@ -46,11 +50,15 @@ public interface ForwardingFilter {
     boolean canForwardAgent(Session session);
 
     /**
+     * <p>
      * Determine if the session may arrange for X11 forwarding.
-     * <p/>
+     * </p>
+     *
+     * <p>
      * This server process will open a new listen socket locally and export
      * the address in the environment so X11 clients can be tunneled to the
      * user's X11 display server.
+     * </p>
      *
      * @param session session requesting permission to forward X11 connections.
      * @return true if the X11 forwarding is permitted, false if denied.
@@ -58,13 +66,17 @@ public interface ForwardingFilter {
     boolean canForwardX11(Session session);
 
     /**
+     * <p>
      * Determine if the session may listen for inbound connections.
-     * <p/>
+     * </p>
+     *
+     * <p>
      * This server process will open a new listen socket on the address given
      * by the client (usually 127.0.0.1 but may be any address).  Any inbound
      * connections to this socket will be tunneled over the session to the
      * client, which the client will then forward the connection to another
      * host on the client's side of the network.
+     * </p>
      *
      * @param address address the client has requested this server listen
      *                for inbound connections on, and relay them through the client.
@@ -145,12 +157,16 @@ public interface ForwardingFilter {
     }
 
     /**
+     * <p>
      * Determine if the session may create an outbound connection.
-     * <p/>
+     * </p>
+     *
+     * <p>
      * This server process will connect to another server listening on the
      * address specified by the client.  Usually this is to another port on
      * the same host (127.0.0.1) but may be to any other system this server
      * can reach on the server's side of the network.
+     * </p>
      *
      * @param type    The {@link Type} of requested connection forwarding
      * @param address address the client has requested this server listen

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/61e637c4/sshd-core/src/main/java/org/apache/sshd/server/shell/InvertedShell.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/shell/InvertedShell.java b/sshd-core/src/main/java/org/apache/sshd/server/shell/InvertedShell.java
index 26b4a11..c385429 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/shell/InvertedShell.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/shell/InvertedShell.java
@@ -37,8 +37,8 @@ public interface InvertedShell {
      * Starts the shell and will make the streams available for
      * the ssh server to retrieve and use.
      *
-     * @param env
-     * @throws IOException
+     * @param env The environment
+     * @throws IOException if failed to start
      */
     void start(Map<String, String> env) throws IOException;
 
@@ -46,28 +46,24 @@ public interface InvertedShell {
      * Returns the output stream used to feed the shell.
      * This method is called after the shell has been started.
      *
-     * @return
+     * @return The {@link OutputStream} used to feed the shell
      */
     OutputStream getInputStream();
 
     /**
-     * Return an InputStream representing the output stream of the shell.
-     *
-     * @return
+     * @return The {@link InputStream} representing the output stream of the shell
      */
     InputStream getOutputStream();
 
     /**
-     * Return an InputStream representing the error stream of the shell.
-     *
-     * @return
+     * @return The {@link InputStream} representing the error stream of the shell
      */
     InputStream getErrorStream();
 
     /**
      * Check if the underlying shell is still alive
      *
-     * @return
+     * @return {@code true} if alive
      */
     boolean isAlive();
 


[2/4] mina-sshd git commit: [SSHD-542] Checkstyle validation

Posted by lg...@apache.org.
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