-
Bug
-
Resolution: Done
-
Major
-
1.1.19.Final, 2.2.0.CR2
-
None
-
None
Having this e.g this class:
public class BeanDefault<T extends AbstractClass> { }
and its specialization like this:
@Specializes public class BeanCustom<T extends AbstractClass> extends BeanDefault<T> { }
will result in:
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001511: Specializing bean Managed Bean [class mypackage.BeanCustom] with qualifiers [@Any @Default] does not have bean type class mypackage.BeanDefault<T> of specialized bean Managed Bean [class mypackage.BeanDefault] with qualifiers [@Any @Default]
This is IMHO inappropriate since the type BeanDefault<T> is present. CDI spec says just:
Formally, a bean X is said to specialize another bean Y if either:
...
Furthermore, X must have all the bean types of Y. If X does not have some bean type of Y, the container automatically de-
tects the problem and treats it as a definition error.