[weld-issues] [JBoss JIRA] Issue Comment Edited: (WELD-978) Cannot fire event with parameterized type as a payload

Martin Kouba (JIRA) jira-events at lists.jboss.org
Mon Oct 3 09:38:26 EDT 2011


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

Martin Kouba edited comment on WELD-978 at 10/3/11 9:36 AM:
------------------------------------------------------------

The problem is how to allow firing events with parameterized type as a payload and disallow firing events with type variables as a payload at the same time. AFAIK there is no way to resolve actual type arguments of parameterized type from its definition in runtime (this makes sense BTW). However it is possible to resolve actual type arguments of parametrized type if used in concrete method or field. In case of standard way of firing event (@Inject Event<Foo> foo...) the only solution seems to be to inspect its InjectionPoint. But I do not know of any suitable solution for *javax.enterprise.inject.spi.BeanManager.fireEvent(Object, Annotation...)*.




      was (Author: mkouba):
    AFIK there is no way to resolve actual type arguments of parameterized type from its definition in runtime (this makes sense BTW). However it is possible to resolve actual type arguments of parametrized type if used in concrete method or field. In case of standard way of firing event (@Inject Event<Foo> foo...) the only solution seems to be to inspect its InjectionPoint. But I do not know of any suitable solution for *javax.enterprise.inject.spi.BeanManager.fireEvent(Object, Annotation...)*.



  
> Cannot fire event with parameterized type as a payload
> ------------------------------------------------------
>
>                 Key: WELD-978
>                 URL: https://issues.jboss.org/browse/WELD-978
>             Project: Weld
>          Issue Type: Bug
>    Affects Versions: 1.1.2.Final
>            Reporter: Martin Kouba
>
> It should be possible to fire event with parameterized type as a payload.
> See CDI 1.0 spec chapter *10.1. Event types and qualifier types*.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list