From 9683a110d6ca963ea8bec9ada17dbe5446c17f1b Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 23 Apr 2010 16:28:14 +0000 Subject: [PATCH] plugin cleanups --- .../java/src/net/i2p/router/web/PluginStarter.java | 3 ++- .../java/src/net/i2p/router/web/WebAppStarter.java | 2 ++ history.txt | 5 ++++- router/java/src/net/i2p/router/RouterVersion.java | 2 +- .../java/src/net/i2p/router/startup/LoadClientAppsJob.java | 1 - 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java index 86dd05d3f1..3c4c4fd9b2 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java @@ -445,7 +445,8 @@ public class PluginStarter implements Runnable { break; } - log.debug("plugin name = <" + pluginName + ">; threads running? " + isClientThreadRunning(pluginName) + "; webapp runing? " + WebAppStarter.isWebAppRunning(pluginName) + "; jobs running? " + isJobRunning); + if (log.shouldLog(Log.DEBUG)) + log.debug("plugin name = <" + pluginName + ">; threads running? " + isClientThreadRunning(pluginName) + "; webapp runing? " + WebAppStarter.isWebAppRunning(pluginName) + "; jobs running? " + isJobRunning); return isClientThreadRunning(pluginName) || WebAppStarter.isWebAppRunning(pluginName) || isJobRunning; } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java b/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java index 94b6a4892a..6bd9b0e1f7 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java @@ -89,6 +89,8 @@ public class WebAppStarter { static boolean isWebAppRunning(String appName) { Server server = WebAppStarter.getConsoleServer(); + if (server == null) + return false; // this will return a new context if one does not exist HttpContext wac = server.getContext('/' + appName); return wac.isStarted(); diff --git a/history.txt b/history.txt index bdab6b3dc8..7469899db0 100644 --- a/history.txt +++ b/history.txt @@ -1,6 +1,9 @@ +2010-04-23 zzz + * Plugins: Cleanups + 2010-04-21 zzz * EepGet: Don't convert a MalformedURLException into - an IOE so we recognize it when it's throuwn + an IOE so we recognize it when it's thrown * ReusableGZIPStreams: - Concurrent - Workaround for Apache Harmony 5.0M13 Deflater bug diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 25340f779d..421ff4f630 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 15; + public final static long BUILD = 16; /** for example "-test" */ public final static String EXTRA = "-rc"; diff --git a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java index ab21bc8006..13dae3a157 100644 --- a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java +++ b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java @@ -4,7 +4,6 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.CountDownLatch; import net.i2p.router.JobImpl; import net.i2p.router.RouterContext;