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