Formatter fix for "throws" declarations
The previous format would sometimes align these declaration very far
to the right. Change the formatting to avoid this.
diff --git a/sshd-common/src/test/java/org/apache/sshd/common/util/security/eddsa/Ed25519VectorsTest.java b/sshd-common/src/test/java/org/apache/sshd/common/util/security/eddsa/Ed25519VectorsTest.java
index e2d4fa9..1009e8f 100644
--- a/sshd-common/src/test/java/org/apache/sshd/common/util/security/eddsa/Ed25519VectorsTest.java
+++ b/sshd-common/src/test/java/org/apache/sshd/common/util/security/eddsa/Ed25519VectorsTest.java
@@ -64,7 +64,7 @@
private final byte[] expSignature;
public Ed25519VectorsTest(String name, String prvKey, String pubKey, String msg, String signature)
- throws GeneralSecurityException {
+ throws GeneralSecurityException {
prvBytes = BufferUtils.decodeHex(BufferUtils.EMPTY_HEX_SEPARATOR, prvKey);
privateKey = EdDSASecurityProviderUtils.generateEDDSAPrivateKey(prvBytes.clone());
pubBytes = BufferUtils.decodeHex(BufferUtils.EMPTY_HEX_SEPARATOR, pubKey);
diff --git a/sshd-contrib/src/test/java/org/apache/sshd/contrib/common/signature/LegacyDSASignerTest.java b/sshd-contrib/src/test/java/org/apache/sshd/contrib/common/signature/LegacyDSASignerTest.java
index 1ab162a..0a6350d 100644
--- a/sshd-contrib/src/test/java/org/apache/sshd/contrib/common/signature/LegacyDSASignerTest.java
+++ b/sshd-contrib/src/test/java/org/apache/sshd/contrib/common/signature/LegacyDSASignerTest.java
@@ -61,7 +61,7 @@
private final KeyPair kp;
public LegacyDSASignerTest(int keySize)
- throws IOException, GeneralSecurityException {
+ throws IOException, GeneralSecurityException {
this.keySize = keySize;
String resourceName = KeyPairProvider.SSH_DSS + "-" + keySize;
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2Session.java b/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2Session.java
index 6249e85..3f6f577 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2Session.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2Session.java
@@ -81,7 +81,7 @@
public Nio2Session(Nio2Service service, PropertyResolver propertyResolver, IoHandler handler,
AsynchronousSocketChannel socket,
SocketAddress acceptanceAddress)
- throws IOException {
+ throws IOException {
this.service = Objects.requireNonNull(service, "No service instance");
this.propertyResolver = Objects.requireNonNull(propertyResolver, "No property resolver");
this.ioHandler = Objects.requireNonNull(handler, "No IoHandler");
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/auth/pubkey/AuthorizedKeyEntriesPublickeyAuthenticator.java b/sshd-core/src/main/java/org/apache/sshd/server/auth/pubkey/AuthorizedKeyEntriesPublickeyAuthenticator.java
index 40a347b..cb8dc47 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/auth/pubkey/AuthorizedKeyEntriesPublickeyAuthenticator.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/auth/pubkey/AuthorizedKeyEntriesPublickeyAuthenticator.java
@@ -51,8 +51,7 @@
public AuthorizedKeyEntriesPublickeyAuthenticator(Object id, ServerSession session,
Collection<? extends AuthorizedKeyEntry> entries,
PublicKeyEntryResolver fallbackResolver)
- throws IOException,
- GeneralSecurityException {
+ throws IOException, GeneralSecurityException {
this.id = id;
int numEntries = GenericUtils.size(entries);
if (numEntries <= 0) {
diff --git a/sshd-eclipse-formatter-config.xml b/sshd-eclipse-formatter-config.xml
index 3f34f0d..ba98b80 100644
--- a/sshd-eclipse-formatter-config.xml
+++ b/sshd-eclipse-formatter-config.xml
@@ -56,8 +56,8 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="32"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="18"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="32"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="18"/>
- <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="32"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+ <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="32"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="18"/>
diff --git a/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSession.java b/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSession.java
index 9f3f947..091c434 100644
--- a/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSession.java
+++ b/sshd-git/src/main/java/org/apache/sshd/git/transport/GitSshdSession.java
@@ -41,8 +41,7 @@
private final ClientSession session;
public GitSshdSession(URIish uri, CredentialsProvider credentialsProvider, FS fs, int tms)
- throws IOException,
- InterruptedException {
+ throws IOException, InterruptedException {
String user = uri.getUser();
final String pass1 = uri.getPass();
String host = uri.getHost();
diff --git a/sshd-scp/src/main/java/org/apache/sshd/scp/server/InputStreamReader.java b/sshd-scp/src/main/java/org/apache/sshd/scp/server/InputStreamReader.java
index a279647..c158018 100644
--- a/sshd-scp/src/main/java/org/apache/sshd/scp/server/InputStreamReader.java
+++ b/sshd-scp/src/main/java/org/apache/sshd/scp/server/InputStreamReader.java
@@ -97,7 +97,7 @@
* @throws UnsupportedEncodingException if the encoding specified by {@code enc} cannot be found.
*/
public InputStreamReader(InputStream in, final String enc)
- throws UnsupportedEncodingException {
+ throws UnsupportedEncodingException {
super(in);
if (enc == null) {
throw new NullPointerException();
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/fs/SftpFileSystem.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/fs/SftpFileSystem.java
index f31d656..a20c1bb 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/fs/SftpFileSystem.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/fs/SftpFileSystem.java
@@ -81,7 +81,7 @@
public SftpFileSystem(SftpFileSystemProvider provider, String id, ClientSession session,
SftpClientFactory factory, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler)
- throws IOException {
+ throws IOException {
super(provider);
this.id = id;
this.clientSession = Objects.requireNonNull(session, "No client session");
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/DefaultSftpClient.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/DefaultSftpClient.java
index 3cee175..15a42c9 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/DefaultSftpClient.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/DefaultSftpClient.java
@@ -90,7 +90,7 @@
*/
public DefaultSftpClient(ClientSession clientSession, SftpVersionSelector initialVersionSelector,
SftpErrorDataHandler errorDataHandler)
- throws IOException {
+ throws IOException {
super(errorDataHandler);
this.nameDecodingCharset = SftpModuleProperties.NAME_DECODING_CHARSET.getRequired(clientSession);
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpInputStreamAsync.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpInputStreamAsync.java
index 355ac1d..d52b005 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpInputStreamAsync.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpInputStreamAsync.java
@@ -62,7 +62,8 @@
private final String path;
public SftpInputStreamAsync(AbstractSftpClient client, int bufferSize,
- String path, Collection<OpenMode> mode) throws IOException {
+ String path, Collection<OpenMode> mode)
+ throws IOException {
this.log = LoggerFactory.getLogger(getClass());
this.clientInstance = Objects.requireNonNull(client, "No SFTP client instance");
this.path = path;
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpOutputStreamAsync.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpOutputStreamAsync.java
index 3de58d9..a9da917 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpOutputStreamAsync.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpOutputStreamAsync.java
@@ -55,7 +55,8 @@
private final String path;
public SftpOutputStreamAsync(AbstractSftpClient client, int bufferSize,
- String path, Collection<OpenMode> mode) throws IOException {
+ String path, Collection<OpenMode> mode)
+ throws IOException {
this.log = LoggerFactory.getLogger(getClass());
this.clientInstance = Objects.requireNonNull(client, "No SFTP client instance");
this.path = path;
@@ -64,7 +65,8 @@
}
public SftpOutputStreamAsync(AbstractSftpClient client, int bufferSize,
- String path, CloseableHandle handle) throws IOException {
+ String path, CloseableHandle handle)
+ throws IOException {
this.log = LoggerFactory.getLogger(getClass());
this.clientInstance = Objects.requireNonNull(client, "No SFTP client instance");
this.path = path;
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpRemotePathChannel.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpRemotePathChannel.java
index 45e88bb..6f3921b 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpRemotePathChannel.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/SftpRemotePathChannel.java
@@ -74,7 +74,8 @@
private final String path;
public SftpRemotePathChannel(String path, SftpClient sftp, boolean closeOnExit,
- Collection<OpenMode> modes) throws IOException {
+ Collection<OpenMode> modes)
+ throws IOException {
this.log = LoggerFactory.getLogger(getClass());
this.path = ValidateUtils.checkNotNullAndNotEmpty(path, "No remote file path specified");
this.modes = Objects.requireNonNull(modes, "No channel modes specified");
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/sftp/server/FileHandle.java b/sshd-sftp/src/main/java/org/apache/sshd/sftp/server/FileHandle.java
index 1b1657b..8cb4a7d 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/sftp/server/FileHandle.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/sftp/server/FileHandle.java
@@ -53,7 +53,7 @@
private final Collection<FileAttribute<?>> fileAttributes;
public FileHandle(SftpSubsystem subsystem, Path file, String handle, int flags, int access, Map<String, Object> attrs)
- throws IOException {
+ throws IOException {
super(subsystem, file, handle);
Set<StandardOpenOption> options = getOpenOptions(flags, access);
diff --git a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpInputStreamWithChannel.java b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpInputStreamWithChannel.java
index 27aa811..b8b7fe7 100644
--- a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpInputStreamWithChannel.java
+++ b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpInputStreamWithChannel.java
@@ -42,7 +42,8 @@
private long offset;
public SftpInputStreamWithChannel(SftpClient client, int bufferSize, String path,
- Collection<OpenMode> mode) throws IOException {
+ Collection<OpenMode> mode)
+ throws IOException {
this.client = Objects.requireNonNull(client, "No SFTP client instance");
this.path = path;
bb = new byte[1];
diff --git a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpOutputStreamWithChannel.java b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpOutputStreamWithChannel.java
index e58d25b..5ebddeb 100644
--- a/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpOutputStreamWithChannel.java
+++ b/sshd-sftp/src/test/java/org/apache/sshd/sftp/client/SftpOutputStreamWithChannel.java
@@ -41,7 +41,8 @@
private long offset;
public SftpOutputStreamWithChannel(SftpClient client, int bufferSize, String path,
- Collection<OpenMode> mode) throws IOException {
+ Collection<OpenMode> mode)
+ throws IOException {
this.client = Objects.requireNonNull(client, "No SFTP client instance");
this.path = path;
buffer = new byte[bufferSize];