[cdi-dev] [JBoss JIRA] (CDI-434) AfterTypeDiscovery javadoc outdated

Martin Kouba (JIRA) issues at jboss.org
Fri Apr 25 10:42:34 EDT 2014

    [ https://issues.jboss.org/browse/CDI-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12963869#comment-12963869 ] 

Martin Kouba commented on CDI-434:

Note that for alternatives the following paragraph is misleading:

Any observer of this event is permitted to add classes to, or remove classes from, the list of alternatives, list of interceptors or list of decorators. The container must use the final values of these collections, after all observers of AfterTypeDiscovery have been called, to determine the order of the enabled alternatives, interceptors, and decorators for application. The initial values of these collections are defined by the @Priority annotation.

The problem is that the priority value of an alternative is used during resolution and thus the ordering of the alternatives collection does not matter. The container may use the final values to identify removed/deselected alternatives and to declare a new selected alternative for an application - without priority value. However, it must preserve the original priorities to perform resolution correctly.
> AfterTypeDiscovery javadoc outdated
> -----------------------------------
>                 Key: CDI-434
>                 URL: https://issues.jboss.org/browse/CDI-434
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>    Affects Versions: 1.2.Final
>            Reporter: Martin Kouba
>            Assignee: Martin Kouba
> {quote}
> *getAlternatives()* returns the ordered list of enabled alternatives for the application. Alternatives enabled for a bean archive are not included in the list
> {quote}
> vs http://docs.jboss.org/cdi/api/1.2/javax/enterprise/inject/spi/AfterTypeDiscovery.html#getAlternatives%28%29
> The same applies to {{getInterceptors()}} and {{getDecorators()}}.

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