[cdi-dev] [JBoss JIRA] (CDI-600) Specialization code sample is misleading

Antoine Sabot-Durand (JIRA) issues at jboss.org
Thu Jul 28 09:49:01 EDT 2016


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

Antoine Sabot-Durand updated CDI-600:
-------------------------------------
    Fix Version/s: 2.0-EDR2


> 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
>             Fix For: 2.0-EDR2
>
>
> 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