Status: New
Owner: ----
New issue 528 by [email protected]: Unexposed bindings in PrivateModules
cannot be overridden via Modules.override(...)
http://code.google.com/p/google-guice/issues/detail?id=528
For test we'd like to override some bindings inside a PrivateModule with
Modules.override(...) this will only work if you expose the binding -
otherwise it'll throw an exception.
The attached testcase reproduces the behaviour
1) A binding to java.lang.String annotated with
@com.google.inject.name.Named(value=PRIVATE_INPUT) was already configured
at
com.google.billing.test.customerbuilder.service.PrivateModuleOverrideTest.configure(PrivateModuleOverrideTest.java:47).
at
com.google.billing.test.customerbuilder.service.PrivateModuleOverrideTest.provideInput(PrivateModuleOverrideTest.java:64)
1 error
at
com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:402)
at
com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:164)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:116)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:101)
at com.google.inject.Guice.createInjector(Guice.java:105)
at com.google.inject.Guice.createInjector(Guice.java:76)
at com.google.inject.Guice.createInjector(Guice.java:63)
at
com.google.billing.test.customerbuilder.service.PrivateModuleOverrideTest.testPrivateBindingOverride(PrivateModuleOverrideTest.java:42)
Attachments:
PrivateModuleOverrideTest.java 2.1 KB
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.