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

Unnecessary statement in "8.1.2. Decorator delegate injection points" ?

XMLWordPrintable

    • Icon: Clarification Clarification
    • Resolution: Obsolete
    • Icon: Minor Minor
    • None
    • 1.2.Final
    • Decorators
    • None

      Decorators cannot declare observers, producers and disposers according to:

      Interceptors and decorators may not declare producer methods. If an interceptor or decorator has a method annotated @Produces , the container automatically detects the problem and treats it as a definition error.

      and

      Interceptors and decorators may not declare observer methods. If an interceptor or decorator has a method with a parameter annotated @Observes , the container automatically detects the problem
      and treats it as a definition error.

      The question is whether following restriction (basically second sentence) is unnecessary because all conditions (in which this could happen) are already excluded in the above restrictions.

      The delegate injection point must be an injected field, initializer method parameter or bean constructor method parameter. If an injection point that is not an injected field, initializer method parameter or bean constructor method parameter is annotated @Delegate , the container
      automatically detects the problem and treats it as a definition error.

              Unassigned Unassigned
              tremes1@redhat.com Tomas Remes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: