Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-584

check for declared name consistency for specializes beans is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.1.1
    • 1.1.1
    • None

    Description

      tck tests org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise have 3 out of 7 failures caused by this code from WebBeansUtil.configureSpecializations:

      if(comp.getName() != null)

      { throw new DefinitionException("@Specialized Class : " + specializedClass.getName() + " may not explicitly declare a bean name"); }

      First of all, in the debugger, getName is returning the unqualified class name rather than the decapitalized unqualified class name as the spec says. (3.1.5, 3.2.5)

      Second, in these tests there is no @Named annotation so we're comparing default names, which isn't correct. We should be testing for a @Named annotation name. (4.3.1:

      If Y has a name and X declares a name explicitly, using @Named, the container automatically detects the problem and treats it as a definition error. )

      Attachments

        Activity

          People

            djencks David Jencks
            djencks David Jencks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: