redundant exception declarations

This commit is contained in:
Shikhar Bhushan
2010-03-21 01:25:24 +01:00
parent 71b6cee424
commit db4185608d
5 changed files with 7 additions and 13 deletions

View File

@@ -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(),

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -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;
}