[cdi-dev] Challenge TCK test for indirect specialization rules

Jozef Hartinger jharting at redhat.com
Tue Jun 3 06:05:11 EDT 2014

The way I read it is that the "indirect specialization" part is just a 
different way of saying that specialization is transitive. From that it 
is apparent that you cannot just leave out the bean in the middle.


On 06/03/2014 10:37 AM, Mark Struberg wrote:
> Hi!
> The question is about
> org.jboss.cdi.tck.tests.inheritance.specialization.simple.SimpleBeanSpecializationTest#testSpecializingBeanHasNameOfSpecializedBean
> and a few other tests in there.
> Imo they directly contradict 4.3.1 of the spec:
> -------
> Formally, a bean X is said to specialize another bean Y if either:
> • X directly specializes Y, or
> • a bean Z exists, such that X directly specializes Z and Z specializes Y. Then X will inherit the qualifiers and bean name of Y:
> • the qualifiers of X include all qualifiers of Y, together with all qualifiers declared explicitly by X, and
> • if Y has a bean name, the bean name of X is the same as the bean name of Y.
> -------
> in this wording the 'intermediate class' Z in the inheritance chain X -> Z -> Y intentionally gets ignored imo.
> It explicitly doesn't say that 'all @Specializes up in the chain' do account for the name and qualifiers.
> To me it reads like the 'last' (outermost) @Specializes and the 'first' non-specializes beans do count. All @Specializes beans in-between get ignored when it comes to @Named and @Qualifier resolution.
> There was imo also a test for it in the CDI-1.0 TCK which we did successfully pass. But obviously this got rewritten to a different behavior.
> Here is the transcript of my discussion with martin and jozef so far:
> http://transcripts.jboss.org/channel/irc.freenode.org/%23jsr346/2014/%23jsr346.2014-06-03.log.html
> txs and LieGrue,
> strub
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev

More information about the cdi-dev mailing list