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

Adding interceptors and Decorators in the AfterBeanDiscovery event does not work

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Gliffy Diagrams

        Activity

        Hide
        swd847 Stuart Douglas added a comment -

        Tests which demonstrate the problem:

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

        Show
        swd847 Stuart Douglas added a comment - Tests which demonstrate the problem: https://github.com/stuartwdouglas/core/tree/WELD-816
        Hide
        kevinpollet Kevin Pollet added a comment -

        Hi,

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

        Show
        kevinpollet Kevin Pollet added a comment - Hi, Any news about this? My interceptor is found via BeanManager#resolveInterceptors() but it's never called.
        Hide
        alesj Ales Justin added a comment -

        Stuart, any update on this?

        Show
        alesj Ales Justin added a comment - Stuart, any update on this?
        Hide
        luksa Marko Lukša added a comment -
        Show
        luksa Marko Lukša added a comment - Note: tests are now at https://github.com/stuartwdouglas/weld-core/tree/WELD-816
        Hide
        luksa Marko Lukša 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?

        Show
        luksa Marko Lukša 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?
        Hide
        swd847 Stuart Douglas added a comment -

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

        Show
        swd847 Stuart Douglas added a comment - Yea, it looks like that test is buggy, but previously that error was not happening as the decorator was not applied.
        Hide
        luksa Marko Lukša 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).

        Show
        luksa Marko Lukša 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).

          People

          • Assignee:
            luksa Marko Lukša
            Reporter:
            swd847 Stuart Douglas
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development