[cdi-dev] [JBoss JIRA] (CDI-320) Clarify whether ProcessAnnotatedType should be fired for annotations

Ron Šmeral (JIRA) issues at jboss.org
Thu Mar 20 11:56:12 EDT 2014


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

Ron Šmeral commented on CDI-320:
--------------------------------

The quoted text is from pre-1.1 spec snapshot, so it's indeed outdated.

However, the current wording is getting quite confusing again, IMHO, and several points should be made clear:
* the third point, which deals with {{@WithAnnotations}} doesn't seem to belong to the paragraph, as the paragraph talks about what the container must fire, not about what the observers must handle. The point seems redundant because the set of _every Java class, interface or enum discovered_ fully includes the set of _annotated_ Java classes, interfaces or enums discovered. 
* the second point says _"every AnnotatedType representing a Java class, interface or enum"_, but the javadoc for {{AnnotatedType}} says that it _Represents a Java class or interface._ (no {{enum}}). Maybe this should be made consistent, either by modifying the javadoc or the spec.

That said, I hope my understanding of the purpose and implementation of {{@WithAnnotations}} is correct.

Several minor issues:
* there's a typo in the proposed new point: _AferTypeDiscovery_ instead of _AfterTypeDiscovery_.
* also, the quantifiers "every" and "each" should be unified to just one of those. I suppose there's no difference in meaning;
* maybe also add commas (or semicolons?) at ends of lines/points.
                
> Clarify whether ProcessAnnotatedType should be fired for annotations
> --------------------------------------------------------------------
>
>                 Key: CDI-320
>                 URL: https://issues.jboss.org/browse/CDI-320
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Portable Extensions
>            Reporter: Ron Šmeral
>            Assignee: Antoine Sabot-Durand
>              Labels: CDI_spec_chge, Ready_to_fix
>             Fix For: 1.2 Proposed
>
>
> It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for annotations.
> Currently, *11.5.6 ProcessAnnotatedType event* says:
> {quote}
> The container must fire an event, before it processes a type, for each:
> * Java class, interface or enum in a bean archive,
> {quote}
> The word "annotation" has been introduced into the above line and later reverted. 
> {quote}
> * Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
> {quote}
> The wording used here, however, doesn't exclude the option of the annotated type being an Annotation.

--
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