Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-986

Interceptors and decorators may not declare observer methods

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.6.Final, 2.0.0.Alpha1
    • 1.1.2.Final
    • None
    • None

    Description

      CDI 1.0 section 10.4.2 Declaring an observer method states:
      "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."

      There is no definition error detected for interceptor and decorator with observer method. However such observer methods are noop.

      TCK tests for this scenario (CDI 1.1 master branch):
      org.jboss.jsr299.tck.tests.interceptors.definition.broken.observer.InterceptorWithObserverMethodTest
      org.jboss.jsr299.tck.tests.decorators.definition.broken.observer.DecoratorWithObserverMethodTest

      Attachments

        Activity

          People

            rhn-engineering-jharting Jozef Hartinger
            mkouba@redhat.com Martin Kouba
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: