mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 07:40:55 +03:00
redundant exception declarations
This commit is contained in:
@@ -607,7 +607,7 @@ public class SSHClient
|
||||
* @throws TransportException if an error occurs during renegotiation
|
||||
*/
|
||||
public void useCompression()
|
||||
throws ClassNotFoundException, TransportException {
|
||||
throws TransportException {
|
||||
trans.getConfig().setCompressionFactories(Arrays.asList(
|
||||
new DelayedZlibCompression.Factory(),
|
||||
new ZlibCompression.Factory(),
|
||||
|
||||
@@ -17,7 +17,6 @@ package net.schmizz.sshj.connection.channel;
|
||||
|
||||
import net.schmizz.sshj.common.SSHRuntimeException;
|
||||
import net.schmizz.sshj.connection.ConnectionException;
|
||||
import net.schmizz.sshj.transport.TransportException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -105,8 +104,7 @@ public abstract class Window {
|
||||
threshold = Math.min(maxPacketSize * 20, initialSize / 4);
|
||||
}
|
||||
|
||||
public int neededAdjustment()
|
||||
throws TransportException {
|
||||
public int neededAdjustment() {
|
||||
synchronized (lock) {
|
||||
return (size - threshold <= 0) ? (initialSize - size) : 0;
|
||||
}
|
||||
|
||||
@@ -128,13 +128,12 @@ public class RemotePortForwarder
|
||||
private final Forward fwd;
|
||||
|
||||
public ForwardedTCPIPChannel(Connection conn, int recipient, int remoteWinSize, int remoteMaxPacketSize,
|
||||
Forward fwd, String origIP, int origPort)
|
||||
throws TransportException {
|
||||
Forward fwd, String origIP, int origPort) {
|
||||
super(conn, TYPE, recipient, remoteWinSize, remoteMaxPacketSize, origIP, origPort);
|
||||
this.fwd = fwd;
|
||||
}
|
||||
|
||||
/** Returns the forwarding from which this channel originates. */
|
||||
/** @return the forwarding from which this channel originates. */
|
||||
public Forward getParentForward() {
|
||||
return fwd;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,7 @@ public class ConsoleKnownHostsVerifier
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hostKeyChangedAction(Entry entry, String hostname, PublicKey key)
|
||||
throws IOException {
|
||||
protected boolean hostKeyChangedAction(Entry entry, String hostname, PublicKey key) {
|
||||
final KeyType type = KeyType.fromKey(key);
|
||||
final String fp = SecurityUtils.getFingerprint(key);
|
||||
final String path = getFile().getAbsolutePath();
|
||||
|
||||
@@ -204,8 +204,7 @@ public class OpenSSHKnownHosts
|
||||
return saltyBytes;
|
||||
}
|
||||
|
||||
private String getSalt()
|
||||
throws IOException {
|
||||
private String getSalt() {
|
||||
if (salt == null) {
|
||||
salt = Base64.encodeBytes(saltyBytes);
|
||||
}
|
||||
@@ -269,8 +268,7 @@ public class OpenSSHKnownHosts
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean hostKeyChangedAction(Entry entry, String hostname, PublicKey key)
|
||||
throws IOException {
|
||||
protected boolean hostKeyChangedAction(Entry entry, String hostname, PublicKey key) {
|
||||
log.warn("Host key for `{}` has changed!", hostname);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user