From 19276f6badab8fe818c77c4205ffe22cb129e582 Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 24 Sep 2013 14:34:09 -0700 Subject: [PATCH] fix spacing issues and other code review comments --- .../curator/discovery/DiscoveryModule.java | 24 +++---------------- .../java/io/druid/cli/Initialization.java | 14 +++++------ 2 files changed, 10 insertions(+), 28 deletions(-) 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; }