Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
2.0.0.Final
-
None
Description
SimpleBeanSpecializationTest#testIndirectSpecialization() assumes that qualifiers of 'inbetween' specialisations should also get picked up.
But this contradicts the spec
4.3.1. Direct and indirect specialization
...
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 name of Y:
It does intentionally NOT say "Then X will inherit the qualifiers and name of Y and Z"
So having a
class @Specializes @Lazy LazyFarmer extends Farmer
class @Specializes @Landlord Farmer extends Human
class Human
Should per spec lead to LazyFarmer having @Lazy and @Default, but not @Landlord!
Also compare this with the wording for @Named which is really the same!
And you also do not pickup any @Named from the 'intermediate' beans, right?