[cdi-dev] [JBoss JIRA] (CDI-600) Specialization code sample is misleading
Matej Novotny (JIRA)
issues at jboss.org
Tue May 3 09:30:00 EDT 2016
Matej Novotny created CDI-600:
---------------------------------
Summary: Specialization code sample is misleading
Key: CDI-600
URL: https://issues.jboss.org/browse/CDI-600
Project: CDI Specification Issues
Issue Type: Clarification
Components: Inheritance and Specialization
Affects Versions: 2.0-EDR1
Reporter: Matej Novotny
In the spec, there is following code sample explaining how to achieve specialization:
{code}
@Alternative @Specializes
public class MockAsynchronousService extends AsynchronousService {
...
}
{code}
This is IMHO misleading as the {{@Alternative}} annotation is not needed for specialization to work and hence should be removed from this sample. In fact one user approached me recently, asking me some questions regarding CDI specialization, and this sample was a source of his confusion.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the cdi-dev
mailing list