diff --git a/src/main/java/net/schmizz/sshj/AbstractService.java b/src/main/java/net/schmizz/sshj/AbstractService.java index 0a452c57..7a22af2e 100644 --- a/src/main/java/net/schmizz/sshj/AbstractService.java +++ b/src/main/java/net/schmizz/sshj/AbstractService.java @@ -25,7 +25,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** An abstract class for {@link Service} that implements common or default functionality. */ -public abstract class AbstractService implements Service { +public abstract class AbstractService + implements Service { /** Logger */ protected final Logger log = LoggerFactory.getLogger(getClass()); @@ -51,7 +52,8 @@ public abstract class AbstractService implements Service { return this.timeout; } - public void handle(Message msg, SSHPacket buf) throws SSHException { + public void handle(Message msg, SSHPacket buf) + throws SSHException { trans.sendUnimplemented(); } @@ -59,11 +61,13 @@ public abstract class AbstractService implements Service { log.debug("Was notified of {}", error.toString()); } - public void notifyUnimplemented(long seqNum) throws SSHException { + public void notifyUnimplemented(long seqNum) + throws SSHException { throw new SSHException(DisconnectReason.PROTOCOL_ERROR, "Unexpected: SSH_MSG_UNIMPLEMENTED"); } - public void request() throws TransportException { + public void request() + throws TransportException { final Service active = trans.getService(); if (!equals(active)) if (name.equals(active.getName())) @@ -76,7 +80,8 @@ public abstract class AbstractService implements Service { this.timeout = timeout; } - public void notifyDisconnect() throws SSHException { + public void notifyDisconnect() + throws SSHException { log.debug("Was notified of disconnect"); } diff --git a/src/main/java/net/schmizz/sshj/ConfigImpl.java b/src/main/java/net/schmizz/sshj/ConfigImpl.java index f5a0d92d..9daaf403 100644 --- a/src/main/java/net/schmizz/sshj/ConfigImpl.java +++ b/src/main/java/net/schmizz/sshj/ConfigImpl.java @@ -48,7 +48,8 @@ import java.util.Arrays; import java.util.List; -public class ConfigImpl implements Config { +public class ConfigImpl + implements Config { private String version; diff --git a/src/main/java/net/schmizz/sshj/DefaultConfig.java b/src/main/java/net/schmizz/sshj/DefaultConfig.java index 60b9ef49..e2dcf624 100644 --- a/src/main/java/net/schmizz/sshj/DefaultConfig.java +++ b/src/main/java/net/schmizz/sshj/DefaultConfig.java @@ -86,7 +86,8 @@ import java.util.List; * [1] It is worth noting that Sun's JRE does not have the unlimited cryptography extension enabled by default. This * prevents using ciphers with strength greater than 128. */ -public class DefaultConfig extends ConfigImpl { +public class DefaultConfig + extends ConfigImpl { private final Logger log = LoggerFactory.getLogger(getClass()); @@ -157,7 +158,7 @@ public class DefaultConfig extends ConfigImpl { protected void initMACFactories() { setMACFactories(new HMACSHA1.Factory(), new HMACSHA196.Factory(), new HMACMD5.Factory(), - new HMACMD596.Factory()); + new HMACMD596.Factory()); } protected void initCompressionFactories() { diff --git a/src/main/java/net/schmizz/sshj/SocketClient.java b/src/main/java/net/schmizz/sshj/SocketClient.java index 71aac843..bc8fc424 100644 --- a/src/main/java/net/schmizz/sshj/SocketClient.java +++ b/src/main/java/net/schmizz/sshj/SocketClient.java @@ -97,15 +97,18 @@ abstract class SocketClient { connect(InetAddress.getByName(hostname), port, localAddr, localPort); } - public void connect(InetAddress host) throws SocketException, IOException { + public void connect(InetAddress host) + throws SocketException, IOException { connect(host, defaultPort); } - public void connect(String hostname) throws SocketException, IOException { + public void connect(String hostname) + throws SocketException, IOException { connect(hostname, defaultPort); } - public void disconnect() throws IOException { + public void disconnect() + throws IOException { if (socket != null) { socket.close(); socket = null; @@ -197,7 +200,8 @@ abstract class SocketClient { return output; } - void onConnect() throws IOException { + void onConnect() + throws IOException { socket.setSoTimeout(timeout); input = socket.getInputStream(); output = socket.getOutputStream();