Skip to content

Commit

Permalink
Bump net.revelc.code.formatter:formatter-maven-plugin from 2.16.0 to …
Browse files Browse the repository at this point in the history
…2.24.1 (#541)

* Bump net.revelc.code.formatter:formatter-maven-plugin

Bumps net.revelc.code.formatter:formatter-maven-plugin from 2.16.0 to 2.24.1.

---
updated-dependencies:
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Reformat

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
  • Loading branch information
dependabot[bot] and gnodet authored Jul 26, 2024
1 parent 44d5666 commit 0659cbb
Show file tree
Hide file tree
Showing 30 changed files with 117 additions and 115 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.16.0</version>
<version>2.24.1</version>
<configuration>
<skipXmlFormatting>true</skipXmlFormatting>
<skipHtmlFormatting>true</skipHtmlFormatting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -743,7 +743,7 @@ private static List<String> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* Exposes direct access to the underlying buffer
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public class ExposedBufferByteArrayOutputStream extends ByteArrayOutputStream {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
* Various events used by {@link ClientChannel#waitFor(java.util.Collection, long)}
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public enum ClientChannelEvent {
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* A factory for creating forwarder objects for client port forwarding
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
@FunctionalInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public static byte[] readOakleyGroupPrimeValue(Reader r) throws IOException {
* <LI>Remaining lines are appended to one big string assumed to contain the HEX-encoded value</LI>
* </P>
* </UL>
*
*
* @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/**
* Holds KEX negotiation stage configuration
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface KexFactoryManager extends SignatureFactoriesManager, KexExtensionHandlerManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

/**
* Holds providers and helpers related to the server side authentication process
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface ServerAuthenticationManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* Invoked when &quot;hostbased&quot; authentication is used
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
* @see <A HREF="https://tools.ietf.org/html/rfc4252#section-9">RFC 4252 - section 9</A>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ public interface CommandLifecycle {
/**
* Starts the command execution. All streams must have been set <U>before</U> calling this method. The command
* should implement {@link java.lang.Runnable}, and this method should spawn a new thread like:
*
*
* <pre>
* {@code Thread(this).start(); }
* {@code
* Thread(this).start();
* }
* </pre>
*
* @param channel The {@link ChannelSession} through which the command has been received
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public interface ServerSession
* <LI>Sends the {@code SSH_MSG_USERAUTH_SUCCESS} message.</LI>
* </P>
* </UL>
*
*
* @param username The authenticated username
* @param authService The service to start
* @param buffer Any extra data received to use to start the service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class LdapNetworkConnector<C> extends NetworkConnector {
public static final String DEFAULT_LDAP_BIND_PASSWORD_PATTERN = "{1}";
/**
* A list of known binary attributes
*
*
* @see <A HREF="http://docs.oracle.com/javase/jndi/tutorial/ldap/misc/attrs.html">LDAP Attributes</A>
*/
public static final String DEFAULT_BINARY_ATTRIBUTES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* <code>&quot;{0}@my.domain.com&quot;</code>.</LI>
* </P>
* </OL>
*
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public class LdapPasswordAuthenticator extends LdapAuthenticator implements PasswordAuthenticator {
Expand Down
Loading

0 comments on commit 0659cbb

Please sign in to comment.