diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-07-25 07:17:31 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-07-25 07:17:31 +0200 |
commit | 725d5d318527c4f9429889ee7208064e59caafae (patch) | |
tree | e0adb56e13631bcbc1b7762032043a790e03fe17 /sonar-application/src | |
parent | e2be8c675c3da9ea90efbbd6a2e26b3b3688d6c9 (diff) | |
download | sonarqube-725d5d318527c4f9429889ee7208064e59caafae.tar.gz sonarqube-725d5d318527c4f9429889ee7208064e59caafae.zip |
SONAR-4898 - Fixed AppTest (NPE when App is not started)
Diffstat (limited to 'sonar-application/src')
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/App.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java index a2b63eab3e8..9be3956c795 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -124,8 +124,12 @@ public class App implements ProcessMXBean { logger.info("Shutting down server"); monitor.interrupt(); monitor = null; - elasticsearch.terminate(); - server.terminate(); + if (elasticsearch != null) { + elasticsearch.terminate(); + } + if (server != null) { + server.terminate(); + } } } |