Matus Abaffy created CDI-436:
--------------------------------
Summary: Specialization requirements do not allow parameterized types to be
specialized
Key: CDI-436
URL:
https://issues.jboss.org/browse/CDI-436
Project: CDI Specification Issues
Issue Type: Bug
Reporter: Matus Abaffy
{quote}
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 detects the problem and treats it as a definition error.
{quote}
The tricky part about having all the bean types is that two parameterized types might not
equal (in the java sense) even though they "are the same". That's because of
the inequality between type variables. Example:
{code}
class Foo<T> {}
{code}
{code}
class Bar<T> extends Foo<T> {}
{code}
Bar seems to have all the bean types of Foo, but it does not. Foo<T> from class Bar
is not equal to Foo<T> from class Foo.
I suppose the intention of the spec. was that if bean X specializes bean Y, then for each
bean type T of Y, X must have a bean type U that is assignable from T.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira