findbugs high-rank issues

This commit is contained in:
zzz
2011-01-05 14:49:51 +00:00
parent e2c3ea3ffc
commit 6822bf7978
5 changed files with 10 additions and 12 deletions

View File

@ -98,7 +98,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
_clientId = clientId;
this.localPort = localPort;
this.l = l;
this.handlerName = handlerName + _clientId;
this.handlerName = localPort + " #" + _clientId;
_ownDest = true; // == ! shared client
_context = tunnel.getContext();
_context.statManager().createRateStat("i2ptunnel.client.closeBacklog", "How many pending sockets remain when we close one due to backlog?", "I2PTunnel", new long[] { 60*1000, 10*60*1000, 60*60*1000 });

View File

@ -182,14 +182,6 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR
* @return true if successful
*/
public boolean addKey(String key, String name) {
String oldName = _trustedKeys.get(key);
// already there?
if (name.equals(oldName))
return true;
if (oldName != null && !oldName.equals("")) {
_log.error("Key for " + name + " already stored for different name " + oldName + " : " + key);
return false;
}
SigningPublicKey signingPublicKey = new SigningPublicKey();
try {
// fromBase64() will throw a DFE if length is not right
@ -198,6 +190,14 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR
_log.error("Invalid signing key for " + name + " : " + key, dfe);
return false;
}
String oldName = _trustedKeys.get(signingPublicKey);
// already there?
if (name.equals(oldName))
return true;
if (oldName != null && !oldName.equals("")) {
_log.error("Key for " + name + " already stored for different name " + oldName + " : " + key);
return false;
}
if ((!name.equals("")) && _trustedKeys.containsValue(name)) {
_log.error("Key mismatch for " + name + ", spoof attempt? : " + key);
return false;

View File

@ -348,7 +348,7 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
}
if (_log.shouldLog(Log.INFO))
_log.info(getJobId() + ": Expired from cache - lease for " + _toString);
_leaseCache.remove(_to);
_leaseCache.remove(hashPair());
}
}

View File

@ -37,7 +37,6 @@ import net.i2p.util.Log;
*
*/
class FloodOnlySearchJob extends FloodSearchJob {
protected volatile int _lookupsRemaining;
private volatile boolean _dead;
private long _created;
private boolean _shouldProcessDSRM;

View File

@ -135,7 +135,6 @@ public class PumpedTunnelGateway extends TunnelGateway {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Time to add " + queueBuf.size() + " messages to " + toString() + ": " + (complete-startAdd)
+ " delayed? " + delayedFlush + " remaining: " + remaining
+ " prepare: " + (beforeLock-startAdd)
+ " add: " + (afterAdded-beforeLock)
+ " preprocess: " + (afterPreprocess-afterAdded)
+ " expire: " + (afterExpire-afterPreprocess)