[cdi-dev] [JBoss JIRA] (CDI-276) Clarify that scope annotations shouldn't be used at injection points
Antoine Sabot-Durand (JIRA)
jira-events at lists.jboss.org
Wed Nov 13 09:48:08 EST 2013
[ https://issues.jboss.org/browse/CDI-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923204#comment-12923204 ]
Antoine Sabot-Durand commented on CDI-276:
------------------------------------------
You're right [~jharting] but it's far from being my favorite. In fact, I was including it in my first case : Container accept the config and does something (or not) depending on your implementation. IMO we should avoid it as much as possible : it's a way to let holes in the specification.
CDI can be a bit tricky for end user sometimes, so it could be an idea to help them when they're doing something that is irrelevant like trying to inject a bean of a certain scope.
> 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