This content has been marked as final.
Show 2 replies
-
1. Re: Generic producer broken with Weld 2
jharting Jan 2, 2013 8:13 AM (in response to alberto_souza)Weld 2 is more strict and does not allow this usage (using raw types of a class with type arguments). Instead, you should use a type variable. The signature of your producer method would look like this:
public <T> List<T> producesList(InjectionPoint injectionPoint){
Note that it's currently being discussed by the expert group whether the non-generic declaration should be supported or not. You can find more information here: https://issues.jboss.org/browse/CDI-304
-
2. Re: Generic producer broken with Weld 2
alberto_souza Jan 3, 2013 8:16 AM (in response to jharting)Thanks Jozef!. I saw the discussion... In my opinion the raw type should work like the old version . I do not see any advantage using this new approach