[cdi-dev] [JBoss JIRA] (CDI-596) ProcessAnnotatedType - clarify what happens if both setAnnotatedType() and configurator are used within observer notification
Antoine Sabot-Durand (JIRA)
issues at jboss.org
Wed Apr 6 08:44:00 EDT 2016
[ https://issues.jboss.org/browse/CDI-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187474#comment-13187474 ]
Antoine Sabot-Durand commented on CDI-596:
------------------------------------------
I think throwing exception is the best approach
> ProcessAnnotatedType - clarify what happens if both setAnnotatedType() and configurator are used within observer notification
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: CDI-596
> URL: https://issues.jboss.org/browse/CDI-596
> Project: CDI Specification Issues
> Issue Type: Clarification
> Reporter: Martin Kouba
> Fix For: 2.0 (discussion)
>
>
> Right now, it's not clear what happens if:
> * a user first calls {{setAnnotatedType()}} and then obtains a reference to the configurator (note that the configurator should be initialized with the AT being processed)
> * a user obtains a reference to a configurator and then invokes {{setAnnotatedType()}}
> We could either forbid using both of these methods during one notification, or state that the "last one wins". I would rather go the first way as the second solution might be confusing and error-prone.
> This applies to {{ProcessObserverMethod}}, {{ProcessBeanAttributes}} and {{ProcessInjectionPoint}} as well.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the cdi-dev
mailing list