From c58fbfe40c5b4fc8a1c92f9475aafe07907ca1a2 Mon Sep 17 00:00:00 2001 From: Himadri Singh Date: Thu, 19 Dec 2013 10:49:38 +0530 Subject: [PATCH] minor fixes --- .../main/java/io/druid/initialization/Initialization.java | 7 +++++-- server/src/main/java/io/druid/server/StatusResource.java | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/io/druid/initialization/Initialization.java b/server/src/main/java/io/druid/initialization/Initialization.java index 48fe618a5b8..5e8e0461202 100644 --- a/server/src/main/java/io/druid/initialization/Initialization.java +++ b/server/src/main/java/io/druid/initialization/Initialization.java @@ -111,9 +111,12 @@ public class Initialization */ public static Set getLoadedModules(Class clazz) { - return extensionsMap.get(clazz); + Set retVal = extensionsMap.get(clazz); + if (retVal == null) { + return Sets.newHashSet(); + } + return retVal; } - public synchronized static Collection getFromExtensions(ExtensionsConfig config, Class clazz) { diff --git a/server/src/main/java/io/druid/server/StatusResource.java b/server/src/main/java/io/druid/server/StatusResource.java index 7d8ec62d611..643d4d4fd74 100644 --- a/server/src/main/java/io/druid/server/StatusResource.java +++ b/server/src/main/java/io/druid/server/StatusResource.java @@ -148,7 +148,7 @@ public class StatusResource @Override public String toString() { - if (artifact.isEmpty()) { + if (artifact == null || artifact.isEmpty()) { return String.format(" - %s ", name); } else { return String.format(" - %s (%s-%s)", name, artifact, version); @@ -194,6 +194,5 @@ public class StatusResource { return usedMemory; } - } }