Findbugs: A stab at squashing some issues across the board. Probably more to follow.

This commit is contained in:
dg2-new
2013-11-10 19:04:57 +00:00
parent 18e4c2ac63
commit 0a8f79f0e3
8 changed files with 22 additions and 20 deletions

View File

@@ -526,7 +526,8 @@ public class Blocklist {
if (pib == null) continue;
// O(n**2)
for (int i = 0; i < rv.size(); i++) {
if (DataHelper.eq(rv.get(i), pib)) continue;
// findbugs triggered on this, looks like unfinished work
//if (DataHelper.eq(rv.get(i), pib)) continue;
}
rv.add(pib);
}

View File

@@ -146,7 +146,7 @@ class FloodfillMonitorJob extends JobImpl {
final RouterContext rc = getContext();
final String log = String.format(
"FF criteria breakdown: happy=%b, capabilities=%s, maxLag=%d, known=%d, " +
"active=%d, participating=%d, offset=%d, ssuAddr=%b",
"active=%d, participating=%d, offset=%d, ssuAddr=%s",
happy,
rc.router().getRouterInfo().getCapabilities(),
rc.jobQueue().getMaxLag(),
@@ -154,7 +154,7 @@ class FloodfillMonitorJob extends JobImpl {
rc.commSystem().countActivePeers(),
rc.tunnelManager().getParticipatingCount(),
Math.abs(rc.clock().getOffset()),
rc.router().getRouterInfo().getTargetAddress("SSU")
rc.router().getRouterInfo().getTargetAddress("SSU").toString()
);
_log.debug(log);
}

View File

@@ -415,7 +415,7 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
if(getIP == null || !getIP.postControlAction())
return -1;
return Integer.valueOf(getIP.getOutputArgumentList().getArgument("NewUpstreamMaxBitRate").getValue());
return Integer.parseInt(getIP.getOutputArgumentList().getArgument("NewUpstreamMaxBitRate").getValue());
}
/**
@@ -429,7 +429,7 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
if(getIP == null || !getIP.postControlAction())
return -1;
return Integer.valueOf(getIP.getOutputArgumentList().getArgument("NewDownstreamMaxBitRate").getValue());
return Integer.parseInt(getIP.getOutputArgumentList().getArgument("NewDownstreamMaxBitRate").getValue());
}
/** debug only */