[cdi-dev] [JBoss JIRA] (CDI-609) Clarify behaviour of ObserverMethodConfigurator<T> read

Martin Kouba (JIRA) issues at jboss.org
Fri May 27 03:11:00 EDT 2016


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

Martin Kouba commented on CDI-609:
----------------------------------

I think we should probably throw an {{IllegalArgumentException}} - this is what we're going to implement as a part of WELD-2159.

> Clarify behaviour of ObserverMethodConfigurator<T> read
> -------------------------------------------------------
>
>                 Key: CDI-609
>                 URL: https://issues.jboss.org/browse/CDI-609
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>    Affects Versions: 2.0-EDR2
>            Reporter: Tomas Remes
>
> It's not clear what should happen in case if you are using ObserverMethodConfigurator and attempting to read from a method ({{Method}}, {{AnnotatedMethod}}) which doesn't have any parameter annotated @Observes. E.g something like this in ABD lifecycle event ("observesMelon" doesn't have any @Observes):
> {code}
> Method melonMethod = FruitObserver.class.getMethod("observesMelon", Melon.class);
> abd.addObserverMethod().read(melonMethod)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list