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

Adding interceptors and Decorators in the AfterBeanDiscovery event does not work

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • None
    • None
    • None

          [WELD-816] Adding interceptors and Decorators in the AfterBeanDiscovery event does not work

          Marko Luksa (Inactive) added a comment - - edited

          I've fixed both tests and they both pass. Will not be adding the tests to master because there are two existing tests that test this already (org.jboss.weld.tests.interceptors.extension.CustomInterceptorInvocationTest and org.jboss.weld.tests.decorators.custom.CustomDecoratorTest).

          Marko Luksa (Inactive) added a comment - - edited I've fixed both tests and they both pass. Will not be adding the tests to master because there are two existing tests that test this already (org.jboss.weld.tests.interceptors.extension.CustomInterceptorInvocationTest and org.jboss.weld.tests.decorators.custom.CustomDecoratorTest).

          Yea, it looks like that test is buggy, but previously that error was not happening as the decorator was not applied.

          Stuart Douglas (Inactive) added a comment - Yea, it looks like that test is buggy, but previously that error was not happening as the decorator was not applied.

          Hmm, how come https://github.com/stuartwdouglas/weld-core/blob/WELD-816/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/decorators/spi/DecoratorImpl.java doesn't return anything in getInjectionPoints()?

          The test fails with: IllegalStateException: WELD-000020 Delegate injection point not found on decorator ForwardingBean null for org.jboss.weld.tests.extensions.decorators.spi.DecoratorImpl@395d601f

          I don't see how this test should work. What am I missing?

          Marko Luksa (Inactive) added a comment - Hmm, how come https://github.com/stuartwdouglas/weld-core/blob/WELD-816/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/decorators/spi/DecoratorImpl.java doesn't return anything in getInjectionPoints()? The test fails with: IllegalStateException: WELD-000020 Delegate injection point not found on decorator ForwardingBean null for org.jboss.weld.tests.extensions.decorators.spi.DecoratorImpl@395d601f I don't see how this test should work. What am I missing?

          Marko Luksa (Inactive) added a comment - Note: tests are now at https://github.com/stuartwdouglas/weld-core/tree/WELD-816

          Stuart, any update on this?

          Ales Justin added a comment - Stuart, any update on this?

          Hi,

          Any news about this?
          My interceptor is found via BeanManager#resolveInterceptors() but it's never called.

          Kévin Pollet (Inactive) added a comment - Hi, Any news about this? My interceptor is found via BeanManager#resolveInterceptors() but it's never called.

          Tests which demonstrate the problem:

          https://github.com/stuartwdouglas/core/tree/WELD-816

          Stuart Douglas (Inactive) added a comment - Tests which demonstrate the problem: https://github.com/stuartwdouglas/core/tree/WELD-816

            marko.luksa@gmail.com Marko Luksa (Inactive)
            sdouglas1@redhat.com Stuart Douglas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: