From cd6d9cdd940e9f0686fddb2623ff4c89ce734be1 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Tue, 14 Apr 2015 14:04:31 +0000 Subject: [PATCH] Router: Fix NPE on bad share bandwidth config (ticket #1524) --- router/java/src/net/i2p/router/Router.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index 9007cdea10..1ea1abca12 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -357,6 +357,8 @@ public class Router implements RouterClock.ClockShiftListener { */ private void startupStuff() { // ********* Start no threads before here ********* // + _log = _context.logManager().getLog(Router.class); + // // NOW we can start the ping file thread. if (!SystemVersion.isAndroid()) @@ -391,8 +393,8 @@ public class Router implements RouterClock.ClockShiftListener { _routerInfo = null; _higherVersionSeen = false; - _log = _context.logManager().getLog(Router.class); - _log.info("New router created with config file " + _configFilename); + if (_log.shouldLog(Log.INFO)) + _log.info("New router created with config file " + _configFilename); _oomListener = new OOMListener(_context); _shutdownHook = new ShutdownHook(_context); -- GitLab