forked from I2P_Developers/i2p.i2p
Findbugs all over
This commit is contained in:
@@ -52,6 +52,8 @@ public class RouterKeyGenerator extends RoutingKeyGenerator {
|
||||
public RouterKeyGenerator(I2PAppContext context) {
|
||||
_log = context.logManager().getLog(RoutingKeyGenerator.class);
|
||||
_context = context;
|
||||
// make sure GMT is set, azi2phelper Vuze plugin is disabling static JVM TZ setting in Router.java
|
||||
_fmt.setCalendar(_cal);
|
||||
// ensure non-null mod data
|
||||
generateDateBasedModData();
|
||||
}
|
||||
@@ -61,14 +63,10 @@ public class RouterKeyGenerator extends RoutingKeyGenerator {
|
||||
private volatile long _nextMidnight;
|
||||
private volatile long _lastChanged;
|
||||
|
||||
private final static Calendar _cal = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
private final Calendar _cal = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
private static final String FORMAT = "yyyyMMdd";
|
||||
private static final int LENGTH = FORMAT.length();
|
||||
private final static SimpleDateFormat _fmt = new SimpleDateFormat(FORMAT, Locale.US);
|
||||
static {
|
||||
// make sure GMT is set, azi2phelper Vuze plugin is disabling static JVM TZ setting in Router.java
|
||||
_fmt.setCalendar(_cal);
|
||||
}
|
||||
private final SimpleDateFormat _fmt = new SimpleDateFormat(FORMAT, Locale.US);
|
||||
|
||||
/**
|
||||
* The current (today's) mod data.
|
||||
|
@@ -113,7 +113,7 @@ class BloomFilterIVValidator implements IVValidator {
|
||||
path = _context.getBaseDir().toString();
|
||||
}
|
||||
String msg =
|
||||
"Configured for " + DataHelper.formatSize(KBps *1024) +
|
||||
"Configured for " + DataHelper.formatSize(KBps *1024L) +
|
||||
"Bps share bandwidth but only " +
|
||||
DataHelper.formatSize(maxMemory) + "B available memory." +
|
||||
" Recommend increasing wrapper.java.maxmemory in " +
|
||||
@@ -121,7 +121,7 @@ class BloomFilterIVValidator implements IVValidator {
|
||||
// getMaxMemory() returns significantly lower than wrapper config, so add 10%
|
||||
" to at least " + (recMaxMem * 11 / 10 / (1024*1024)) + " (MB)" +
|
||||
" if the actual share bandwidth exceeds " +
|
||||
DataHelper.formatSize(threshKBps * 1024) + "Bps.";
|
||||
DataHelper.formatSize(threshKBps * 1024L) + "Bps.";
|
||||
System.out.println("WARN: " + msg);
|
||||
_context.logManager().getLog(BloomFilterIVValidator.class).logAlways(Log.WARN, msg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user