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

Throw DefinitionException if a portable extension tries to add a bean with an invalid bean type

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 2.1.0.Beta1
    • None
    • Extensions
    • None

    Description

      Weld should check if the bean types of beans added through AfterBeanDiscovery.addBean() are valid and throw a DefinitionException if not.

      Currently, portable extensions can add beans that have a parameterized type with a wildcard parameter among its bean types. This should not be allowed per http://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#legal_bean_types

      Also, if the bean type is a parameterized type containing a type variable, the bean's scope must be @Dependent. This is the same as with producer methods & fields.

      Attachments

        Issue Links

          Activity

            People

              marko.luksa@gmail.com Marko Luksa (Inactive)
              marko.luksa@gmail.com Marko Luksa (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: