Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-600

Specialization code sample is misleading

    XMLWordPrintable

Details

    Description

      In the spec, there is following code sample explaining how to achieve specialization:

      @Alternative @Specializes
      public class MockAsynchronousService extends AsynchronousService {
      ... 
      }
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            manovotn Matěj Novotný
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: