diff --git a/pom.xml b/pom.xml index cae0da783..d78b47229 100644 --- a/pom.xml +++ b/pom.xml @@ -999,7 +999,7 @@ net.revelc.code.formatter formatter-maven-plugin - 2.16.0 + 2.24.1 true true diff --git a/sshd-common/src/main/java/org/apache/sshd/common/file/util/BaseFileSystem.java b/sshd-common/src/main/java/org/apache/sshd/common/file/util/BaseFileSystem.java index 51b9a03bc..e835912eb 100644 --- a/sshd-common/src/main/java/org/apache/sshd/common/file/util/BaseFileSystem.java +++ b/sshd-common/src/main/java/org/apache/sshd/common/file/util/BaseFileSystem.java @@ -123,7 +123,7 @@ protected void appendDedupSep(StringBuilder sb, CharSequence s) { /** * In case we are running on Windows, accept "\\" as a file separator. Ignore in *nix as "\\" is a valid filename - * + * * @param name the name to fix the separator for if running on Windows * @return the fixed name */ diff --git a/sshd-common/src/main/java/org/apache/sshd/common/util/io/IoUtils.java b/sshd-common/src/main/java/org/apache/sshd/common/util/io/IoUtils.java index 11dd1d92d..5d1bb0697 100644 --- a/sshd-common/src/main/java/org/apache/sshd/common/util/io/IoUtils.java +++ b/sshd-common/src/main/java/org/apache/sshd/common/util/io/IoUtils.java @@ -601,7 +601,7 @@ public static String appendPathComponent(String prefix, String component) { StringBuilder sb = new StringBuilder( prefix.length() + component.length() + File.separator.length()) - .append(prefix); + .append(prefix); if (sb.charAt(prefix.length() - 1) == File.separatorChar) { if (component.charAt(0) == File.separatorChar) { @@ -743,7 +743,7 @@ private static List removeExtraCdUps(Path toResolve) { /** * Build a path from the list of path parts - * + * * @param root the root path * @param fs the filesystem * @param namesList the parts of the path to build diff --git a/sshd-contrib/src/main/java/org/apache/sshd/contrib/common/util/io/ExposedBufferByteArrayOutputStream.java b/sshd-contrib/src/main/java/org/apache/sshd/contrib/common/util/io/ExposedBufferByteArrayOutputStream.java index e64f8ffaf..48a8912d8 100644 --- a/sshd-contrib/src/main/java/org/apache/sshd/contrib/common/util/io/ExposedBufferByteArrayOutputStream.java +++ b/sshd-contrib/src/main/java/org/apache/sshd/contrib/common/util/io/ExposedBufferByteArrayOutputStream.java @@ -23,7 +23,7 @@ /** * Exposes direct access to the underlying buffer - * + * * @author Apache MINA SSHD Project */ public class ExposedBufferByteArrayOutputStream extends ByteArrayOutputStream { diff --git a/sshd-core/src/main/java/org/apache/sshd/client/channel/ClientChannelEvent.java b/sshd-core/src/main/java/org/apache/sshd/client/channel/ClientChannelEvent.java index d0d6c1034..4ee0a0c91 100644 --- a/sshd-core/src/main/java/org/apache/sshd/client/channel/ClientChannelEvent.java +++ b/sshd-core/src/main/java/org/apache/sshd/client/channel/ClientChannelEvent.java @@ -24,7 +24,7 @@ /** * Various events used by {@link ClientChannel#waitFor(java.util.Collection, long)} - * + * * @author Apache MINA SSHD Project */ public enum ClientChannelEvent { @@ -42,13 +42,13 @@ public enum ClientChannelEvent { EOF, /** * Received exit status from remote peer - * + * * @see ClientChannel#getExitStatus() **/ EXIT_STATUS, /** * Received exit signal from remote peer - * + * * @see ClientChannel#getExitSignal() */ EXIT_SIGNAL, diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java index d86bd4f77..3722a0ee9 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java @@ -222,7 +222,7 @@ public synchronized void write(byte[] buf, int s, int l) throws IOException { } catch (InterruptedException e) { throw (IOException) new InterruptedIOException( "Interrupted while waiting for remote space on write len=" + l + " to " + this) - .initCause(e); + .initCause(e); } session.resetIdleTimeout(); break; diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/RequestHandler.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/RequestHandler.java index 1feb723da..275d0490b 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/channel/RequestHandler.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/RequestHandler.java @@ -64,7 +64,7 @@ public static Result fromName(String name) { /** * Process an SSH request. If an exception is thrown, the ConnectionService will send a failure message if needed * and the request will be considered handled. - * + * * @param t The input parameter * @param request The request string * @param wantReply Whether a reply is requested diff --git a/sshd-core/src/main/java/org/apache/sshd/common/forward/ForwarderFactory.java b/sshd-core/src/main/java/org/apache/sshd/common/forward/ForwarderFactory.java index 6bf06f22b..c5d95f6b9 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/forward/ForwarderFactory.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/forward/ForwarderFactory.java @@ -22,7 +22,7 @@ /** * A factory for creating forwarder objects for client port forwarding - * + * * @author Apache MINA SSHD Project */ @FunctionalInterface diff --git a/sshd-core/src/main/java/org/apache/sshd/common/kex/DHGroupData.java b/sshd-core/src/main/java/org/apache/sshd/common/kex/DHGroupData.java index 9c2c2704f..8907e341f 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/kex/DHGroupData.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/kex/DHGroupData.java @@ -194,7 +194,7 @@ public static byte[] readOakleyGroupPrimeValue(Reader r) throws IOException { *
  • Remaining lines are appended to one big string assumed to contain the HEX-encoded value
  • *

    * - * + * * @param br The {@link BufferedReader} to read the data from * @return The prime value bytes suitable for building a {@code BigInteger} * @throws IOException If invalid data or no encoded value found diff --git a/sshd-core/src/main/java/org/apache/sshd/common/kex/KexFactoryManager.java b/sshd-core/src/main/java/org/apache/sshd/common/kex/KexFactoryManager.java index 5aa0cf826..c64548483 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/kex/KexFactoryManager.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/kex/KexFactoryManager.java @@ -39,7 +39,7 @@ /** * Holds KEX negotiation stage configuration - * + * * @author Apache MINA SSHD Project */ public interface KexFactoryManager extends SignatureFactoriesManager, KexExtensionHandlerManager { diff --git a/sshd-core/src/main/java/org/apache/sshd/server/ServerAuthenticationManager.java b/sshd-core/src/main/java/org/apache/sshd/server/ServerAuthenticationManager.java index 52a666117..5d3d52a96 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/ServerAuthenticationManager.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/ServerAuthenticationManager.java @@ -46,7 +46,7 @@ /** * Holds providers and helpers related to the server side authentication process - * + * * @author Apache MINA SSHD Project */ public interface ServerAuthenticationManager diff --git a/sshd-core/src/main/java/org/apache/sshd/server/auth/hostbased/HostBasedAuthenticator.java b/sshd-core/src/main/java/org/apache/sshd/server/auth/hostbased/HostBasedAuthenticator.java index 2aa6686bf..43abc6b2a 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/auth/hostbased/HostBasedAuthenticator.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/auth/hostbased/HostBasedAuthenticator.java @@ -27,7 +27,7 @@ /** * Invoked when "hostbased" authentication is used - * + * * @author Apache MINA SSHD Project * @see RFC 4252 - section 9 */ diff --git a/sshd-core/src/main/java/org/apache/sshd/server/command/CommandLifecycle.java b/sshd-core/src/main/java/org/apache/sshd/server/command/CommandLifecycle.java index f91669529..d95f65f3b 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/command/CommandLifecycle.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/command/CommandLifecycle.java @@ -31,9 +31,11 @@ public interface CommandLifecycle { /** * Starts the command execution. All streams must have been set before calling this method. The command * should implement {@link java.lang.Runnable}, and this method should spawn a new thread like: - * + * *
    -     * {@code Thread(this).start(); }
    +     * {@code
    +     * Thread(this).start();
    +     * }
          * 
    * * @param channel The {@link ChannelSession} through which the command has been received diff --git a/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java index c0c97699c..b566ef54e 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerSession.java @@ -77,7 +77,7 @@ public interface ServerSession *
  • Sends the {@code SSH_MSG_USERAUTH_SUCCESS} message.
  • *

    * - * + * * @param username The authenticated username * @param authService The service to start * @param buffer Any extra data received to use to start the service diff --git a/sshd-core/src/test/java/org/apache/sshd/client/auth/pubkey/HostBoundPubKeyAuthTest.java b/sshd-core/src/test/java/org/apache/sshd/client/auth/pubkey/HostBoundPubKeyAuthTest.java index d99b84231..325f2fe04 100644 --- a/sshd-core/src/test/java/org/apache/sshd/client/auth/pubkey/HostBoundPubKeyAuthTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/client/auth/pubkey/HostBoundPubKeyAuthTest.java @@ -67,16 +67,16 @@ public class HostBoundPubKeyAuthTest extends BaseTestSupport { .run("mkdir -p /home/bob/.ssh") // Create the SSH config directory .entryPoint("/entrypoint.sh") // Sets bob as owner of anything under /home/bob and launches sshd .build())) // - .withCopyFileToContainer( - MountableFile.forClasspathResource(TEST_KEYS + "/user01_authorized_keys"), - "/home/bob/.ssh/authorized_keys") - // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex - .withCopyFileToContainer( - MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), - "/entrypoint.sh") - .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)) - .withExposedPorts(22) // - .withLogConsumer(new Slf4jLogConsumer(LOG)); + .withCopyFileToContainer( + MountableFile.forClasspathResource(TEST_KEYS + "/user01_authorized_keys"), + "/home/bob/.ssh/authorized_keys") + // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex + .withCopyFileToContainer( + MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), + "/entrypoint.sh") + .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)) + .withExposedPorts(22) // + .withLogConsumer(new Slf4jLogConsumer(LOG)); private final String privateKeyName; diff --git a/sshd-core/src/test/java/org/apache/sshd/client/opensshcerts/ClientOpenSSHCertificatesTest.java b/sshd-core/src/test/java/org/apache/sshd/client/opensshcerts/ClientOpenSSHCertificatesTest.java index fe2e68282..a5fe5b121 100644 --- a/sshd-core/src/test/java/org/apache/sshd/client/opensshcerts/ClientOpenSSHCertificatesTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/client/opensshcerts/ClientOpenSSHCertificatesTest.java @@ -95,46 +95,46 @@ public class ClientOpenSSHCertificatesTest extends BaseTestSupport { .run("echo 'user02:password02' | chpasswd") // ...both users .entryPoint("/entrypoint.sh") // Sets up supervisor to run sshd .build())) // - .withCopyFileToContainer(MountableFile.forClasspathResource( - "org/apache/sshd/client/opensshcerts/docker/sshd_config"), "/etc/ssh/sshd_config") - .withCopyFileToContainer( - MountableFile.forClasspathResource( - "org/apache/sshd/client/opensshcerts/docker/supervisord.conf"), - "/etc/supervisor/supervisord.conf") - .withCopyFileToContainer( - MountableFile.forClasspathResource( - "org/apache/sshd/client/opensshcerts/user/user01_authorized_keys"), - "/keys/user/user01/authorized_keys") - .withCopyFileToContainer( - MountableFile.forClasspathResource( - "org/apache/sshd/client/opensshcerts/user/user02_authorized_keys"), - "/keys/user/user02/authorized_keys") - .withCopyFileToContainer( - MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host01"), - "/keys/host/host01") - .withCopyFileToContainer( - MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host01" - + PublicKeyEntry.PUBKEY_FILE_SUFFIX), - "/keys/host/host01" + PublicKeyEntry.PUBKEY_FILE_SUFFIX) - .withCopyFileToContainer( - MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host02"), - "/keys/host/host02") - .withCopyFileToContainer( - MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host02" - + PublicKeyEntry.PUBKEY_FILE_SUFFIX), - "/keys/host/host02" + PublicKeyEntry.PUBKEY_FILE_SUFFIX) - .withCopyFileToContainer( - MountableFile.forClasspathResource( - "org/apache/sshd/client/opensshcerts/ca/ca" + PublicKeyEntry.PUBKEY_FILE_SUFFIX), - "/ca" + PublicKeyEntry.PUBKEY_FILE_SUFFIX) - // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex - .withCopyFileToContainer( - MountableFile.forClasspathResource( - "org/apache/sshd/client/opensshcerts/docker/entrypoint.sh", 0x1ff), - "/entrypoint.sh") - // must be set to "/keys/host/host01" or "/keys/host/host02" - .withEnv("SSH_HOST_KEY", "/keys/host/host01") // - .withExposedPorts(22); + .withCopyFileToContainer(MountableFile.forClasspathResource( + "org/apache/sshd/client/opensshcerts/docker/sshd_config"), "/etc/ssh/sshd_config") + .withCopyFileToContainer( + MountableFile.forClasspathResource( + "org/apache/sshd/client/opensshcerts/docker/supervisord.conf"), + "/etc/supervisor/supervisord.conf") + .withCopyFileToContainer( + MountableFile.forClasspathResource( + "org/apache/sshd/client/opensshcerts/user/user01_authorized_keys"), + "/keys/user/user01/authorized_keys") + .withCopyFileToContainer( + MountableFile.forClasspathResource( + "org/apache/sshd/client/opensshcerts/user/user02_authorized_keys"), + "/keys/user/user02/authorized_keys") + .withCopyFileToContainer( + MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host01"), + "/keys/host/host01") + .withCopyFileToContainer( + MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host01" + + PublicKeyEntry.PUBKEY_FILE_SUFFIX), + "/keys/host/host01" + PublicKeyEntry.PUBKEY_FILE_SUFFIX) + .withCopyFileToContainer( + MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host02"), + "/keys/host/host02") + .withCopyFileToContainer( + MountableFile.forClasspathResource("org/apache/sshd/client/opensshcerts/host/host02" + + PublicKeyEntry.PUBKEY_FILE_SUFFIX), + "/keys/host/host02" + PublicKeyEntry.PUBKEY_FILE_SUFFIX) + .withCopyFileToContainer( + MountableFile.forClasspathResource( + "org/apache/sshd/client/opensshcerts/ca/ca" + PublicKeyEntry.PUBKEY_FILE_SUFFIX), + "/ca" + PublicKeyEntry.PUBKEY_FILE_SUFFIX) + // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex + .withCopyFileToContainer( + MountableFile.forClasspathResource( + "org/apache/sshd/client/opensshcerts/docker/entrypoint.sh", 0x1ff), + "/entrypoint.sh") + // must be set to "/keys/host/host01" or "/keys/host/host02" + .withEnv("SSH_HOST_KEY", "/keys/host/host01") // + .withExposedPorts(22); private static final String USER_KEY_PATH = "org/apache/sshd/client/opensshcerts/user/"; diff --git a/sshd-core/src/test/java/org/apache/sshd/common/cipher/OpenSshCipherTest.java b/sshd-core/src/test/java/org/apache/sshd/common/cipher/OpenSshCipherTest.java index 10d6c34e7..e7389c504 100644 --- a/sshd-core/src/test/java/org/apache/sshd/common/cipher/OpenSshCipherTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/common/cipher/OpenSshCipherTest.java @@ -74,14 +74,14 @@ public class OpenSshCipherTest extends BaseTestSupport { .run("mkdir -p /home/bob/.ssh") // Create the SSH config directory .entryPoint("/entrypoint.sh") // Sets bob as owner of anything under /home/bob and launches sshd .build())) // - .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_RESOURCES + "/bob_key.pub"), - "/home/bob/.ssh/authorized_keys") - // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex - .withCopyFileToContainer( - MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), - "/entrypoint.sh") - .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)).withExposedPorts(22) // - .withLogConsumer(new Slf4jLogConsumer(LOG)); + .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_RESOURCES + "/bob_key.pub"), + "/home/bob/.ssh/authorized_keys") + // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex + .withCopyFileToContainer( + MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), + "/entrypoint.sh") + .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)).withExposedPorts(22) // + .withLogConsumer(new Slf4jLogConsumer(LOG)); private final String providerName; diff --git a/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingWithOpenSshTest.java b/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingWithOpenSshTest.java index 6f77e7280..1d9910c81 100644 --- a/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingWithOpenSshTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingWithOpenSshTest.java @@ -190,16 +190,16 @@ public void forwardingWithConnectionClose() throws Exception { .run("mkdir -p /root/.ssh") // Create the SSH config directory .entryPoint("/entrypoint.sh") // .build())) // - .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_KEYS + "/user01_ed25519"), - "/root/.ssh/id_ed25519") - .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_KEYS + "/user01_ed25519.pub"), - "/root/.ssh/id_ed25519.pub") - // Spotbugs doesn't like 0777, so use hex - .withCopyFileToContainer(MountableFile.forHostPath(entryPoint.getPath(), 0x1ff), - "/entrypoint.sh") - .withAccessToHost(true) // - .waitingFor(Wait.forLogMessage(".*forwarding_success.*\n", 1)) - .withLogConsumer(new Slf4jLogConsumer(LOG)); + .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_KEYS + "/user01_ed25519"), + "/root/.ssh/id_ed25519") + .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_KEYS + "/user01_ed25519.pub"), + "/root/.ssh/id_ed25519.pub") + // Spotbugs doesn't like 0777, so use hex + .withCopyFileToContainer(MountableFile.forHostPath(entryPoint.getPath(), 0x1ff), + "/entrypoint.sh") + .withAccessToHost(true) // + .waitingFor(Wait.forLogMessage(".*forwarding_success.*\n", 1)) + .withLogConsumer(new Slf4jLogConsumer(LOG)); try { Testcontainers.exposeHostPorts(sshPort, gRpcPort); sshdContainer.start(); diff --git a/sshd-core/src/test/java/org/apache/sshd/common/kex/extension/StrictKexInteroperabilityTest.java b/sshd-core/src/test/java/org/apache/sshd/common/kex/extension/StrictKexInteroperabilityTest.java index 5a77fde3a..7c578202e 100644 --- a/sshd-core/src/test/java/org/apache/sshd/common/kex/extension/StrictKexInteroperabilityTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/common/kex/extension/StrictKexInteroperabilityTest.java @@ -121,15 +121,15 @@ private void testStrictKex(boolean withStrictKex) throws Exception { .run("mkdir -p /home/bob/.ssh") // Create the SSH config directory .entryPoint("/entrypoint.sh") // .build())) // - .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_RESOURCES + "/bob_key.pub"), - "/home/bob/.ssh/authorized_keys") - // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex - .withCopyFileToContainer( - MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), - "/entrypoint.sh") - .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)) // - .withExposedPorts(22) // - .withLogConsumer(new Slf4jLogConsumer(LOG)); + .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_RESOURCES + "/bob_key.pub"), + "/home/bob/.ssh/authorized_keys") + // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex + .withCopyFileToContainer( + MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), + "/entrypoint.sh") + .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)) // + .withExposedPorts(22) // + .withLogConsumer(new Slf4jLogConsumer(LOG)); sshdContainer.start(); try { FileKeyPairProvider keyPairProvider = CommonTestSupportUtils.createTestKeyPairProvider(TEST_RESOURCES + "/bob_key"); diff --git a/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapNetworkConnector.java b/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapNetworkConnector.java index cf596f655..5be56e073 100644 --- a/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapNetworkConnector.java +++ b/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapNetworkConnector.java @@ -80,7 +80,7 @@ public class LdapNetworkConnector extends NetworkConnector { public static final String DEFAULT_LDAP_BIND_PASSWORD_PATTERN = "{1}"; /** * A list of known binary attributes - * + * * @see LDAP Attributes */ public static final String DEFAULT_BINARY_ATTRIBUTES diff --git a/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapPasswordAuthenticator.java b/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapPasswordAuthenticator.java index 8b9e2bfe5..3973b3fc8 100644 --- a/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapPasswordAuthenticator.java +++ b/sshd-ldap/src/main/java/org/apache/sshd/ldap/LdapPasswordAuthenticator.java @@ -46,7 +46,7 @@ * "{0}@my.domain.com". *

    * - * + * * @author Apache MINA SSHD Project */ public class LdapPasswordAuthenticator extends LdapAuthenticator implements PasswordAuthenticator { diff --git a/sshd-openpgp/src/main/java/org/apache/sshd/openpgp/PGPKeyPairResourceParser.java b/sshd-openpgp/src/main/java/org/apache/sshd/openpgp/PGPKeyPairResourceParser.java index e8d2eeda7..0691e1894 100644 --- a/sshd-openpgp/src/main/java/org/apache/sshd/openpgp/PGPKeyPairResourceParser.java +++ b/sshd-openpgp/src/main/java/org/apache/sshd/openpgp/PGPKeyPairResourceParser.java @@ -81,7 +81,7 @@ public Collection extractKeyPairs( int numLines = GenericUtils.size(lines); StringBuilder sb = new StringBuilder( beginMarker.length() + endMarker.length() + 4 + numLines * 80) - .append(beginMarker); + .append(beginMarker); if (numLines > 0) { for (String l : lines) { sb.append(eol).append(l); diff --git a/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyReader.java b/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyReader.java index 903db8607..cab66b0b0 100644 --- a/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyReader.java +++ b/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyReader.java @@ -30,7 +30,7 @@ /** * Helper class for {@code Putty} key files decoders - * + * * @author Apache MINA SSHD Project */ public class PuttyKeyReader implements Closeable { diff --git a/sshd-scp/src/main/java/org/apache/sshd/scp/common/AbstractScpTransferEventListenerAdapter.java b/sshd-scp/src/main/java/org/apache/sshd/scp/common/AbstractScpTransferEventListenerAdapter.java index ef6043b0c..bd4b82b0b 100644 --- a/sshd-scp/src/main/java/org/apache/sshd/scp/common/AbstractScpTransferEventListenerAdapter.java +++ b/sshd-scp/src/main/java/org/apache/sshd/scp/common/AbstractScpTransferEventListenerAdapter.java @@ -30,7 +30,7 @@ /** * A no-op implementation of {@link ScpTransferEventListener} for those who wish to implement only a small number of * methods. By default, all non-overridden methods simply log at TRACE level their invocation parameters - * + * * @author Apache MINA SSHD Project */ public abstract class AbstractScpTransferEventListenerAdapter diff --git a/sshd-scp/src/test/java/org/apache/sshd/scp/client/ScpCharsetTest.java b/sshd-scp/src/test/java/org/apache/sshd/scp/client/ScpCharsetTest.java index 3d7753cb9..5382ea024 100644 --- a/sshd-scp/src/test/java/org/apache/sshd/scp/client/ScpCharsetTest.java +++ b/sshd-scp/src/test/java/org/apache/sshd/scp/client/ScpCharsetTest.java @@ -69,14 +69,14 @@ public class ScpCharsetTest extends BaseTestSupport { .run("mkdir -p /home/bob/.ssh") // Create the SSH config directory .entryPoint("/entrypoint.sh") // Prepare environment, set locale, and launch .build())) // - .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_RESOURCES + "/bob_key.pub"), - "/home/bob/.ssh/authorized_keys") - // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex - .withCopyFileToContainer( - MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), - "/entrypoint.sh") - .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)).withExposedPorts(22) // - .withLogConsumer(new Slf4jLogConsumer(LOG)); + .withCopyFileToContainer(MountableFile.forClasspathResource(TEST_RESOURCES + "/bob_key.pub"), + "/home/bob/.ssh/authorized_keys") + // entrypoint must be executable. Spotbugs doesn't like 0777, so use hex + .withCopyFileToContainer( + MountableFile.forClasspathResource(TEST_RESOURCES + "/entrypoint.sh", 0x1ff), + "/entrypoint.sh") + .waitingFor(Wait.forLogMessage(".*Server listening on :: port 22.*\\n", 1)).withExposedPorts(22) // + .withLogConsumer(new Slf4jLogConsumer(LOG)); @Rule public TemporaryFolder tmp = new TemporaryFolder(); diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/FullAccessSftpClient.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/FullAccessSftpClient.java index eec17c5eb..79813057e 100644 --- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/FullAccessSftpClient.java +++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/FullAccessSftpClient.java @@ -23,7 +23,7 @@ /** * Provides both structured and raw SFTP access - * + * * @author Apache MINA SSHD Project */ public interface FullAccessSftpClient extends SftpClient, RawSftpClient { diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/SftpMessage.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/SftpMessage.java index a21ee0a0e..75491fa4d 100644 --- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/SftpMessage.java +++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/SftpMessage.java @@ -51,7 +51,7 @@ public SftpMessage(int id, IoWriteFuture future, Duration timeout) { /** * Retrieves the SFTP message id. - * + * * @return the SFTP message id */ public int getId() { @@ -69,7 +69,7 @@ public IoWriteFuture getFuture() { /** * Retrieves the write timeout configured when the message was sent. - * + * * @return the timeout, never {@code null} */ public Duration getTimeout() { @@ -78,7 +78,7 @@ public Duration getTimeout() { /** * Waits with the configured timeout until the message has been sent. - * + * * @throws IOException if the message could not be sent, or waiting is interrupted. */ public void waitUntilSent() throws IOException { diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/common/SftpUniversalOwnerAndGroup.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/common/SftpUniversalOwnerAndGroup.java index 4948028f8..f5b522b5a 100644 --- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/common/SftpUniversalOwnerAndGroup.java +++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/common/SftpUniversalOwnerAndGroup.java @@ -27,7 +27,7 @@ /** * Some universal identifiers used in owner and/or group specification strings - * + * * @author Apache MINA SSHD Project * @see SFTP ACL */ diff --git a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/AbstractCheckFileExtensionTest.java b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/AbstractCheckFileExtensionTest.java index b192122ad..c7ac8fab8 100644 --- a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/AbstractCheckFileExtensionTest.java +++ b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/AbstractCheckFileExtensionTest.java @@ -134,7 +134,7 @@ private void testCheckFileExtension(String expectedAlgorithm, int inputDataSize, + "-" + expectedAlgorithm + "-" + inputDataSize + "/" + hashBlockSize + IoUtils.EOL) - .getBytes(StandardCharsets.UTF_8); + .getBytes(StandardCharsets.UTF_8); try (ByteArrayOutputStream baos = new ByteArrayOutputStream(inputDataSize + seed.length)) { while (baos.size() < inputDataSize) { diff --git a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/CopyDataExtensionImplTest.java b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/CopyDataExtensionImplTest.java index e24458d72..8d3867942 100644 --- a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/CopyDataExtensionImplTest.java +++ b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/extensions/helpers/CopyDataExtensionImplTest.java @@ -118,7 +118,7 @@ private void testCopyDataExtension(int dataSize, int readOffset, int readLength, + "-" + dataSize + "-" + readOffset + "/" + readLength + "/" + writeOffset + IoUtils.EOL) - .getBytes(StandardCharsets.UTF_8); + .getBytes(StandardCharsets.UTF_8); try (ByteArrayOutputStream baos = new ByteArrayOutputStream(dataSize + seed.length)) { while (baos.size() < dataSize) { baos.write(seed);