findbugs correctness fixes, all over the place

This commit is contained in:
zzz
2013-11-07 19:20:25 +00:00
parent 5cbecb3599
commit ae76a6ee1a
8 changed files with 21 additions and 15 deletions

View File

@@ -318,8 +318,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
if (s.isClosed()) {
if (_log.shouldLog(Log.INFO))
_log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Building a new socket manager since the old one closed [s=" + s + "]");
if (s != null)
tunnel.removeSession(s);
tunnel.removeSession(s);
// We could be here a LONG time, holding the lock
socketManager = buildSocketManager(tunnel, pkf);
} else {

View File

@@ -128,7 +128,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
int pp = getIntOption(OPT_POST_MAX, 0);
int pt = getIntOption(OPT_POST_TOTAL_MAX, 0);
synchronized(this) {
if (pp != 0 || pp != 0 || _postThrottler != null) {
if (pp != 0 || pt != 0 || _postThrottler != null) {
long pw = 1000L * getIntOption(OPT_POST_WINDOW, DEFAULT_POST_WINDOW);
long pb = 1000L * getIntOption(OPT_POST_BAN_TIME, DEFAULT_POST_BAN_TIME);
long px = 1000L * getIntOption(OPT_POST_TOTAL_BAN_TIME, DEFAULT_POST_TOTAL_BAN_TIME);