Findbugs all over

This commit is contained in:
zzz
2015-07-12 14:02:55 +00:00
parent 631a0674ab
commit 914cc120ad
13 changed files with 119 additions and 53 deletions

View File

@@ -27,7 +27,6 @@ import net.i2p.util.Log;
public class I2PSOCKSTunnel extends I2PTunnelClientBase {
private HashMap<String, List<String>> proxies = null; // port# + "" or "default" -> hostname list
protected Destination outProxyDest = null;
//public I2PSOCKSTunnel(int localPort, Logging l, boolean ownDest) {
// I2PSOCKSTunnel(localPort, l, ownDest, (EventDispatcher)null);

View File

@@ -52,8 +52,6 @@ import net.i2p.util.EventDispatcher;
private static final AtomicLong __clientId = new AtomicLong();
protected long _clientId;
protected Destination dest;
private final Object startLock = new Object();
private final I2PSession _session;
@@ -98,6 +96,7 @@ import net.i2p.util.EventDispatcher;
// create a session
try {
ByteArrayInputStream in = new ByteArrayInputStream(key);
// FIXME this may not pick up non-default I2CP host/port settings from tunnel
_session = client.createSession(in, tunnel.getClientOptions());
connected(_session);
} catch(Exception exc) {

View File

@@ -87,19 +87,12 @@ public class I2PTunnelUDPServerBase extends I2PTunnelTask implements Source, Sin
private void init(boolean verify, InputStream privData, String privkeyname, Logging l) {
this.l = l;
int portNum = 7654;
if (getTunnel().port != null) {
try {
portNum = Integer.parseInt(getTunnel().port);
} catch (NumberFormatException nfe) {
_log.log(Log.CRIT, "Invalid port specified [" + getTunnel().port + "], reverting to " + portNum);
}
}
// create i2pclient
I2PClient client = I2PClientFactory.createClient();
try {
// FIXME this may not pick up non-default I2CP host/port settings from tunnel
_session = client.createSession(privData, getTunnel().getClientOptions());
connected(_session);
} catch(I2PSessionException exc) {