fix spacing issues and other code review comments

This commit is contained in:
fjy 2013-09-24 14:34:09 -07:00
parent be5bb7f2eb
commit 19276f6bad
2 changed files with 10 additions and 28 deletions

View File

@ -76,13 +76,7 @@ public class DiscoveryModule implements Module
*/ */
public static void registerDefault(Binder binder) public static void registerDefault(Binder binder)
{ {
registerKey( registerKey(binder, Key.get(new TypeLiteral<DruidNode>(){}));
binder, Key.get(
new TypeLiteral<DruidNode>()
{
}
)
);
} }
/** /**
@ -96,13 +90,7 @@ public class DiscoveryModule implements Module
*/ */
public static void register(Binder binder, Annotation annotation) public static void register(Binder binder, Annotation annotation)
{ {
registerKey( registerKey(binder, Key.get(new TypeLiteral<DruidNode>(){}, annotation));
binder, Key.get(
new TypeLiteral<DruidNode>()
{
}, annotation
)
);
} }
/** /**
@ -116,13 +104,7 @@ public class DiscoveryModule implements Module
*/ */
public static void register(Binder binder, Class<? extends Annotation> annotation) public static void register(Binder binder, Class<? extends Annotation> annotation)
{ {
registerKey( registerKey(binder, Key.get(new TypeLiteral<DruidNode>(){}, annotation));
binder, Key.get(
new TypeLiteral<DruidNode>()
{
}, annotation
)
);
} }
/** /**

View File

@ -97,6 +97,13 @@ public class
final TeslaAether aether = getAetherClient(config); final TeslaAether aether = getAetherClient(config);
List<T> retVal = Lists.newArrayList(); List<T> 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()) { for (String coordinate : config.getCoordinates()) {
log.info("Loading extension[%s]", coordinate); log.info("Loading extension[%s]", coordinate);
try { 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; return retVal;
} }