Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-580

illegal TCK test for indirect specialization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.0.0.Final
    • Tests
    • None

      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?

              tremes1@redhat.com Tomas Remes
              struberg Mark Struberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: