[weld-issues] [JBoss JIRA] (WELD-811) Hierarchy injection is not working with external annotation type.

Gert Palok (JIRA) jira-events at lists.jboss.org
Tue Feb 7 12:38:49 EST 2012


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

Gert Palok commented on WELD-811:
---------------------------------

This issue is still present on 1.1.5.Final and 2.0.0.Alpha1

For the simplest case:
{code}
private <X> void processAnnotatedType(@Observes ProcessAnnotatedType<X> event) {
    final AnnotatedType<X> annotatedType = event.getAnnotatedType();
    event.setAnnotatedType(new AnnotatedType<X>() {
        // delegate all methods to annotatedType
    });
}
{code}

This happens because BeanDeployer wraps modified annotated types with DiscoveredExternalAnnotatedType and WeldClassImpl sets superclass to Object (instead of the expected rawType.getSuperclass())

Why?
                
> Hierarchy injection is not working with external annotation type.
> -----------------------------------------------------------------
>
>                 Key: WELD-811
>                 URL: https://issues.jboss.org/browse/WELD-811
>             Project: Weld
>          Issue Type: Bug
>          Components: Weld SPI
>    Affects Versions: 1.1.0.CR3
>            Reporter: Rogerio Baldini
>            Assignee: Stuart Douglas
>             Fix For: 1.1.2.Final
>
>
> In WeldClassImpl constructor, superclass is set as an Object.class when annotatedType is instanceof ExternalAnnotatedType (discovered flag). Why?
> This behavior causes a non injection of superclasses fields and methods. Is this correct ?

--
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