brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [7/9] git commit: Avoid NPE in BrooklynWebServer.stop
Date Mon, 03 Nov 2014 14:24:59 GMT
Avoid NPE in BrooklynWebServer.stop

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/bb28e29c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/bb28e29c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/bb28e29c

Branch: refs/heads/master
Commit: bb28e29cc0f6b1f4eeea1a26d018375ca5a14d33
Parents: 5bef686
Author: Aled Sage <aled.sage@gmail.com>
Authored: Mon Nov 3 12:22:15 2014 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Mon Nov 3 12:22:15 2014 +0000

----------------------------------------------------------------------
 .../src/main/java/brooklyn/launcher/BrooklynWebServer.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/bb28e29c/usage/launcher/src/main/java/brooklyn/launcher/BrooklynWebServer.java
----------------------------------------------------------------------
diff --git a/usage/launcher/src/main/java/brooklyn/launcher/BrooklynWebServer.java b/usage/launcher/src/main/java/brooklyn/launcher/BrooklynWebServer.java
index 1d62fad..f4bfacb 100644
--- a/usage/launcher/src/main/java/brooklyn/launcher/BrooklynWebServer.java
+++ b/usage/launcher/src/main/java/brooklyn/launcher/BrooklynWebServer.java
@@ -453,7 +453,7 @@ public class BrooklynWebServer {
     public synchronized void stop() throws Exception {
         if (server==null) return;
         String root = getRootUrl();
-        Threads.removeShutdownHook(shutdownHook);
+        if (shutdownHook != null) Threads.removeShutdownHook(shutdownHook);
         if (log.isDebugEnabled())
             log.debug("Stopping Brooklyn web console at "+root+ " (" + war + (wars != null
? " and " + wars.values() : "") + ")");
 


Mime
View raw message