diff --git a/router/java/src/net/i2p/router/peermanager/SpeedCalculator.java b/router/java/src/net/i2p/router/peermanager/SpeedCalculator.java index c62d894e99b8eb96f3c7391e2ce8189e1c9e1992..7ee12fbab59bb4dc0b5cd8cba325756d6058b76c 100644 --- a/router/java/src/net/i2p/router/peermanager/SpeedCalculator.java +++ b/router/java/src/net/i2p/router/peermanager/SpeedCalculator.java @@ -297,22 +297,12 @@ public class SpeedCalculator extends Calculator { if (_context.router() != null) { String val = _context.router().getConfigSetting(PROP_USE_INSTANTANEOUS_RATES); if (val != null) { - try { - return Boolean.getBoolean(val); - } catch (NumberFormatException nfe) { - if (_log.shouldLog(Log.WARN)) - _log.warn("Instantaneous rate for speed improperly set in the router config [" + val + "]", nfe); - } + return Boolean.valueOf(val).booleanValue(); } } String val = _context.getProperty(PROP_USE_INSTANTANEOUS_RATES, ""+DEFAULT_USE_INSTANTANEOUS_RATES); if (val != null) { - try { - return Boolean.getBoolean(val); - } catch (NumberFormatException nfe) { - if (_log.shouldLog(Log.WARN)) - _log.warn("Instantaneous rate for speed improperly set in the router environment [" + val + "]", nfe); - } + return Boolean.valueOf(val).booleanValue(); } return DEFAULT_USE_INSTANTANEOUS_RATES; }