[cdi-dev] [JBoss JIRA] (CDI-694) Make an observer that uses both @Observes and @ObservesAsync forbidden

Antoine Sabot-Durand (JIRA) issues at jboss.org
Tue Mar 7 05:10:00 EST 2017

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

Antoine Sabot-Durand commented on CDI-694:

Well, section [10.4.2|http://docs.jboss.org/cdi/spec/2.0-PRD/cdi-spec.html#observes] start with the following mention:

{quote}An observer method may be declared by annotating a parameter {{@javax.enterprise.event.Observes}} *or* {{@javax.enterprise.event.ObservesAsync}} of a default-access{quote}

But we could add a mention to say when and how the container should handle such a conflict.

> Make an observer that uses both @Observes and @ObservesAsync forbidden
> ----------------------------------------------------------------------
>                 Key: CDI-694
>                 URL: https://issues.jboss.org/browse/CDI-694
>             Project: CDI Specification Issues
>          Issue Type: Bug
>            Reporter: John Ament
>             Fix For: 2.0 .Final
> Not explicitly called out in the spec text, we should make an observer that has both annotations forbidden.
> RI presently throws a DefinitionException.

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list