[weld-issues] [JBoss JIRA] (WELD-1046) ProcessBeanAttributes fired for producer methods and producer fields has wrong type argument

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Thu Jan 12 06:50:21 EST 2012


     [ https://issues.jboss.org/browse/WELD-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jozef Hartinger resolved WELD-1046.
-----------------------------------

    Resolution: Done

    
> ProcessBeanAttributes fired for producer methods and producer fields has wrong type argument
> --------------------------------------------------------------------------------------------
>
>                 Key: WELD-1046
>                 URL: https://issues.jboss.org/browse/WELD-1046
>             Project: Weld
>          Issue Type: Bug
>            Reporter: Martin Kouba
>            Assignee: Jozef Hartinger
>             Fix For: 2.0.0.Alpha1
>
>
> The spec (CDI 1.1) states: "The event object must be of type javax.enterprise.inject.spi.ProcessBeanAttributes<T> where T is the bean class of the managed bean or session bean, the return type of the producer method, or the type of the producer field."
> However events fired for producer methods and producer fields are of type javax.enterprise.inject.spi.ProcessBeanAttributes<T> where T is the declaring bean class, not the return type or the type of the field.
> There is also invalid test in weld test suite - VerifyValuesTest. Observer methods in [VerifyingExtension|https://github.com/weld/core/blob/2.0/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/lifecycle/processBeanAttributes/VerifyingExtension.java]:
> {code}
> void observeBravo(@Observes ProcessBeanAttributes<BravoProducer> event) {
> bravo = event.getBeanAttributes();
> }
> void observeCharlie(@Observes ProcessBeanAttributes<CharlieProducer> event) {
> charlie = event.getBeanAttributes();
> }
> {code}
> should be replaced with:
> {code}
> void observeBravo(@Observes ProcessBeanAttributes<Bravo> event) {
> bravo = event.getBeanAttributes();
> }
> void observeCharlie(@Observes ProcessBeanAttributes<Charlie> event) {
> charlie = event.getBeanAttributes();
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list