ParametrizedUriEmitterModule.java binding SSLContext a second time

Hi!,

This might be a special case, so let me add some context: running a build of druid 0.11.0 with a downgraded guice (3.0) due to problems with our hadoop installation, I found the following issue while trying to run the command line hadoop indexer:

Caused by: com.google.inject.CreationException: Guice creation errors:

  1. A binding to javax.net.ssl.SSLContext was already configured at io.druid.server.emitter.HttpEmitterModule.configureSsl(HttpEmitterModule.java:70).

at io.druid.server.emitter.HttpEmitterModule.configureSsl(HttpEmitterModule.java:70)

1 error

    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)

    at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)

    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)

    at com.google.inject.Guice.createInjector(Guice.java:95)

    at com.google.inject.Guice.createInjector(Guice.java:72)

    at com.google.inject.Guice.createInjector(Guice.java:62)

    at io.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:401)

    at io.druid.indexer.HadoopDruidIndexerConfig.<clinit>(HadoopDruidIndexerConfig.java:104)

I found that the error was caused by ParametrizedUriEmitterModule.java (line 44) configuring a binding for SSLContext: HttpEmitterModule.configureSsl(binder);

I removed that double binding and the error is gone. Could this be an issue/bug or is it just an edge case for my special build?

Javier.