michaelwiles / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Using GinMapBinder with annotations produces Double-Bound exception #194

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Add following binding to bind a Map:

GinMapBinder<String, String> optionsBinder = GinMapBinder
  .newMapBinder(binder(), String.class, String.class,
    Options.class);     optionsBinder.addBinding("scope").toProvider(LoginScopeProvider.class);

What is the expected output? What do you see instead?

[ERROR] Key @com.google.gwt.inject.client.multibindings.Internal 
java.lang.String is Double-bound: Bound at 
com.google.gwt.inject.client.multibindings.BindingRecorder.bindConstant(BindingR
ecorder.java:46) in 
com.google.gwt.inject.client.multibindings.BindingRecorder.BindingRegistererModu
le and 
com.google.gwt.inject.client.multibindings.BindingRecorder.bind(BindingRecorder.
java:42) in 
com.google.gwt.inject.client.multibindings.BindingRecorder.BindingRegistererModu
le

What version of the product are you using? On what operating system?
2.1.1

Original issue reported on code.google.com by ronny.bu...@gmail.com on 25 Oct 2013 at 3:00

GoogleCodeExporter commented 9 years ago
I haven't tried you code but this basic code patch is already covered with test 
cases[1], so I suspect that your reproduce steps are incomplete. Can you find a 
minimal code snippet that reproduces the problem?

[1] 
https://code.google.com/p/google-gin/source/browse/trunk/test/com/google/gwt/inj
ect/client/multibindings/GinMapBinderTest.java#91

Original comment by gok...@google.com on 25 Oct 2013 at 3:38