Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1267

Broken org.jboss.weld.tests.alternatives.accessible.AccessibleAlternativesTest, wrong assumption

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.11.Final, 2.0.0.Beta1
    • None
    • None
    • None

    Description

      Currently the (skipped) AccessibleAlternativesTest tests for something that is not guaranteed by the spec.
      It assumes that in the following layout (simplified, all files in appropriate folders):

      WAR
        AccessibleAlternativesTest.class
        AUser.class
      
        JAR
          beans.xml (defines BUser as alternative)
          BUser.class (Alternative)
          IUser.class
       
      

      the BUser class will be injected into IUser injection point in AccessibleAlternativesTest.
      This, however, can't work because BUser is defined as an alternative only for the JAR bean archive and therefore is not found as an alternative in the WAR bean archive.

      As per CDI 1.0, 5.1.1,

      An alternative must be explicitly declared using the <alternatives> element of the beans.xml file of the bean archive.

      Attachments

        Activity

          People

            rsmeral Ron Šmeral (Inactive)
            rsmeral Ron Šmeral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: