Status: New
Owner: ----
New issue 287 by phopkins: ConvertedConstantBindingImpl should pass
original Key or Binding to BindingTargetVisitor#visitConvertedConstant
http://code.google.com/p/google-guice/issues/detail?id=287
Repro steps:
public class MyModule extends AbstractModule {
protected void configure() {
bindConstant().annotatedWith(Names.named("year")).to("1955");
}
}
Binding<?> integerBinding = Guice.createInjector(new
MyModule()).getBinding(Key.get(Integer.class, Names.named("year"));
integerBinding.acceptTargetVisitor(visitor);
What happens:
The visitor's #visitConvertedConstant(Object) method is called with the
Integer object that was
created from the "1955" String.
What I expect to happen:
#visitConvertedConstant should be called with arguments that let me get
back to the original
bindConstant() binding, perhaps by passing the Key for the original Binding.
Note: it may be that only Strings can be converted into constants, in which
case I could assume
that the Key will be for String.class, annotation, and you could close this
bug.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---