Forgot to mention that T is an unbound type variable at class level:
public class MethodTypeProduces1<T> and there is no subclass of MethodTypeProduces1 Am 06.07.13 10:12 schrieb "Romain Manni-Bucau" unter <rmannibu...@gmail.com>: >Wait, not sure google ate a part of the code or not but if a <T> then T >can >be String (like ArrayList itself) >Le 6 juil. 2013 09:18, "Arne Limburg" <arne.limb...@openknowledge.de> a >écrit : > >> Hi, >> >> I am currently struggling with the handling of generics in OWB, because >> CDI 1.1 TCK requires us to be much more clever than we are now in this >>area. >> However I stumbled about a test in our test-suite that seems to be wrong >> to me, but I would like to have another opinion. >> With my local implementation of the generic handling (which is much >>better >> than the one in trunk) the following tests fails: >> MethodProducer1Test.testPersonProducer >> >> Basically it tests if an ArrayList with an unbound type variable is >> injectable into an injection point of type ArrayList<String>: >> >> @Produces @Dependent @Named("ProMethodParameterized3") >> >> ArrayList<T> methodPT3() {...} >> >> and >> >> @Inject ArrayList<String> pt3; >> >> Reading 5.2.4 of the CDI 1.1 spec (the fourth bullet point) I would >> suggest that this should lead to an error since String is not assignable >> from Object (which is the upper bound of T). >> >> >> WDYT? >> >> >> Cheers, >> >> Arne >>