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

Fix type parameters ordering in ProcessProducerMethod and ProcessProducerField events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.2.Final
    • Fix Version/s: 2.0-EDR1
    • Component/s: None
    • Labels:
      None

      Description

      Since CDI 1.0 there is an inconsistency in the description of ProcessProducerMethod event...

      The text:

      For a producer method with method return type X of a bean with bean class T, the container must raise an event of type ProcessProducerMethod<T, X>.

      API:

      /**
       * @param <T> The return type of the producer method
       * @param <X> The class of the bean declaring the producer method
       */
      public interface ProcessProducerMethod<T, X> extends ProcessBean<X> {
      }
      

      The same applies to ProcessProducerField.

      TCK and RI (Weld) follow the API. As one of the consequences an ProcessProducerMethod<Foo,Producer> event is not delivered to an observer with the event parameter ProcessBean<Foo> - which is required by the spec but does not make sense at the same time.

      It's obvious that JCP compatibility rules required to keep the wrong ordering for CDI 1.x (see also the comments in javax.enterprise.inject.spi.ProcessProducerMethod). I believe this should be fixed in CDI 2.0.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  antoinesabot-durand Antoine Sabot-Durand
                  Reporter:
                  mkouba Martin Kouba
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: