Issue 247: untargeted bindings of parameterized types fail
http://code.google.com/p/google-guice/issues/detail?id=247

New issue report by logan.johnson:

This:

     new AbstractModule() {
         public void configure() {
             bind(new TypeLiteral<ArrayList<String>>()  
{}).in(Scopes.SINGLETON);
         }
     }

will fail with this message:

     1) No implementation for java.util.ArrayList<java.lang.String> was  
bound.

because BindingProcessor#visitUntargetted checks for this:

     type instanceof Class<?>

But if I modify visitUntargetted to do this:

if ( type instanceof ParameterizedType) {
     type = ((ParameterizedType)type).getRawType();
}

then everything is fine, and I get my ArrayList<String>.


Issue attributes:
        Status: New
        Owner: ----
        Labels: Type-Defect Priority-Medium

-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to