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

Rogerio Baldini (JIRA) jira-events at lists.jboss.org
Wed Dec 29 06:22:17 EST 2010


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

Rogerio Baldini updated WELD-811:
---------------------------------

    Steps to Reproduce: 
Create an extension wrapping an annotation type in class using injected fields (or methods) of its superclass.

class Foo {
	@Inject BeanManager beanManager;
}

class Bar extends Foo {
	// beanManager will be null.
}

public <T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> pat) {
	AnnotatedType<T> w = wrapAnnotatedType(pat.getAnnotatedType());
	pat.setAnnotatedType(w);
}

  was:
Create an extension wrapping an annotation type in class using injected fields (or methods) of its superclass.

class Foo {
	@Inject BeanManager beanManager;
}

class Bar extends Foo {
	// beanManager will be null.
}

public <T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> pat) {
	AnnotatedType<T> w = handleAnnotatedType(pat.getAnnotatedType());
	pat.setAnnotatedType(w);
}



> 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
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list