[cdi-dev] [JBoss JIRA] (CDI-395) Public fields in extensions should not be allowed

Marko Lukša (JIRA) jira-events at lists.jboss.org
Fri Aug 2 03:12:26 EDT 2013

Marko Lukša created CDI-395:

             Summary: Public fields in extensions should not be allowed
                 Key: CDI-395
                 URL: https://issues.jboss.org/browse/CDI-395
             Project: CDI Specification Issues
          Issue Type: Clarification
          Components: Portable Extensions
    Affects Versions: 1.1.PFD
            Reporter: Marko Lukša

Since the container must provide an @ApplicationScoped bean for every extension and since a proxy must be injected into injection points requesting this bean, it should be clear that extensions should not be allowed to have public fields. The spec doesn't specify this explicitly, but it should - like it does for non-dependent managed beans.

The container should treat this as a definition error, otherwise people may end up accessing these public fields of extensions and getting weird errors.

See also WELD-1474

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

More information about the cdi-dev mailing list