[cdi-dev] [JBoss JIRA] (CDI-549) Unnecessary statement in "8.1.2. Decorator delegate injection points" ?

Emily Jiang (JIRA) issues at jboss.org
Mon Jul 27 05:01:02 EDT 2015


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

Emily Jiang commented on CDI-549:
---------------------------------

My view is it does not harm to list them as we should not assume everyone who reads the specification know the full list of the injection points. As far as I know, some people just search particular phrases to verify whether the test application is valid or not. 

> Unnecessary statement in "8.1.2. Decorator delegate injection points" ?
> -----------------------------------------------------------------------
>
>                 Key: CDI-549
>                 URL: https://issues.jboss.org/browse/CDI-549
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Decorators
>    Affects Versions: 1.2.Final
>            Reporter: Tomas Remes
>            Priority: Minor
>
> Decorators cannot declare observers, producers and disposers according to:
> {quote}
> Interceptors and decorators may not declare producer methods. If an interceptor or decorator has a method annotated @Produces , the container automatically detects the problem and treats it as a definition error.
> {quote}
> and
> {quote}
> Interceptors and decorators may not declare observer methods. If an interceptor or decorator has a method with a parameter annotated @Observes , the container automatically detects the problem
> and treats it as a definition error.
> {quote}
> The question is whether following restriction (basically second sentence) is unnecessary because all conditions (in which this could happen) are already excluded in the above restrictions. 
> {quote}
> The delegate injection point must be an injected field, initializer method parameter or bean constructor method parameter. If an injection point that is not an injected field, initializer method parameter or bean constructor method parameter is annotated @Delegate , the container
> automatically detects the problem and treats it as a definition error.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the cdi-dev mailing list