[cdi-dev] [JBoss JIRA] (CDI-276) Clarify that scope annotations shouldn't be used at injection points

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Nov 15 12:16:07 EST 2013


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

Pete Muir commented on CDI-276:
-------------------------------

Java EE specifications rarely contain as many error conditions as CDI, nor do they specify what happens in these situations as much as CDI does.

So we could discuss with the EG introducing this warning requirement, but it's diverging a lot from other specs. Also, it would be very hard to test that it actually happens AFAICT.
                
> Clarify that scope annotations shouldn't be used at injection points
> --------------------------------------------------------------------
>
>                 Key: CDI-276
>                 URL: https://issues.jboss.org/browse/CDI-276
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Contexts
>            Reporter: Nicklas Karlsson
>             Fix For: TBD
>
>
> Sometimes you see people trying to do
> @Inject @ApplicationScoped 
> private SomeRequestScopedBean sRSB;
> It should be clarified that this has no effect. Could even throw a validation exception at deployment.

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