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

Mark Struberg struberg at yahoo.de
Tue Jun 3 04:37:00 EDT 2014


The question is about 
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:

txs and LieGrue,

More information about the cdi-dev mailing list