diff --git a/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java b/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java index ca5340d9565..a632392fbac 100644 --- a/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java +++ b/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java @@ -76,13 +76,7 @@ public class DiscoveryModule implements Module */ public static void registerDefault(Binder binder) { - registerKey( - binder, Key.get( - new TypeLiteral() - { - } - ) - ); + registerKey(binder, Key.get(new TypeLiteral(){})); } /** @@ -96,13 +90,7 @@ public class DiscoveryModule implements Module */ public static void register(Binder binder, Annotation annotation) { - registerKey( - binder, Key.get( - new TypeLiteral() - { - }, annotation - ) - ); + registerKey(binder, Key.get(new TypeLiteral(){}, annotation)); } /** @@ -116,13 +104,7 @@ public class DiscoveryModule implements Module */ public static void register(Binder binder, Class annotation) { - registerKey( - binder, Key.get( - new TypeLiteral() - { - }, annotation - ) - ); + registerKey(binder, Key.get(new TypeLiteral(){}, annotation)); } /** diff --git a/services/src/main/java/io/druid/cli/Initialization.java b/services/src/main/java/io/druid/cli/Initialization.java index f983762ccb0..76f502b1563 100644 --- a/services/src/main/java/io/druid/cli/Initialization.java +++ b/services/src/main/java/io/druid/cli/Initialization.java @@ -97,6 +97,13 @@ public class final TeslaAether aether = getAetherClient(config); List retVal = Lists.newArrayList(); + if (config.searchCurrentClassloader()) { + for (T module : ServiceLoader.load(clazz, Initialization.class.getClassLoader())) { + log.info("Adding local module[%s]", module.getClass()); + retVal.add(module); + } + } + for (String coordinate : config.getCoordinates()) { log.info("Loading extension[%s]", coordinate); try { @@ -164,13 +171,6 @@ public class } } - if (config.searchCurrentClassloader()) { - for (T module : ServiceLoader.load(clazz, Initialization.class.getClassLoader())) { - log.info("Adding local module[%s]", module.getClass()); - retVal.add(module); - } - } - return retVal; }