findbugs all over

This commit is contained in:
zzz
2017-08-09 21:24:02 +00:00
parent 24414845d0
commit 3d385228f0
14 changed files with 15 additions and 16 deletions

View File

@ -190,7 +190,6 @@ public class NewsManager implements ClientApp {
}
private List<NewsEntry> parseInitialNews() {
NewsEntry entry = new NewsEntry();
File file = new File(_context.getBaseDir(), "docs/initialNews/initialNews.xml");
Reader reader = null;
try {

View File

@ -146,7 +146,7 @@ class ProfileOrganizerRenderer {
buf.append("<td align=\"right\"><i>").append(_t("unknown")).append("</i></td>");
}
buf.append("<td align=\"right\">");
String v = info.getOption("router.version");
String v = info != null ? info.getOption("router.version") : null;
if (v != null)
buf.append(DataHelper.stripHTML(v));
buf.append("</td><td align=\"right\">").append(num(prof.getSpeedValue()));

View File

@ -233,7 +233,7 @@ class SybilRenderer {
buf.append("<h3 id=\"dest\" class=\"sybils\">Floodfills Close to Our Destinations</h3>");
Map<Hash, TunnelPool> clientInboundPools = _context.tunnelManager().getInboundClientPools();
List<Hash> destinations = new ArrayList<Hash>(clientInboundPools.keySet());
boolean debug = _context.getBooleanProperty(HelperBase.PROP_ADVANCED);
//boolean debug = _context.getBooleanProperty(HelperBase.PROP_ADVANCED);
for (Hash client : destinations) {
boolean isLocal = _context.clientManager().isLocal(client);
if (!isLocal)
@ -318,7 +318,7 @@ class SybilRenderer {
}
}
double avg = total / (sz * sz / 2);
double avg = total / (sz * sz / 2d);
buf.append("<h3 class=\"sybils\">Average Floodfill Distance is ").append(fmt.format(avg)).append("</h3>");
buf.append("<h3 id=\"pairs\" class=\"sybils\">Closest Floodfill Pairs by Hash</h3>");