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

ProcessAnnotatedType is fired for annotated types created during ProcessAnnotatedType

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.1.0.CR1
    • Fix Version/s: 1.1.0.CR2
    • Component/s: None
    • Labels:
      None

      Description

      It's one of the causes of WELD-794 - if a newly created AnnotatedType is set on the ProcessAnnotatedType event created during WeldBootstrap.addClass(), a second event is fired for that specific type.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            pmuir Pete Muir added a comment -

            I believe this behaviour is correct, what makes you think it isn't?

            Show
            pmuir Pete Muir added a comment - I believe this behaviour is correct, what makes you think it isn't?
            Hide
            pmuir Pete Muir added a comment -

            Or maybe not, I was confused.

            Show
            pmuir Pete Muir added a comment - Or maybe not, I was confused.
            Hide
            pmuir Pete Muir added a comment -

            Actually reading the spec again we should only fire these events for discovered classes. WELD-485 was a mistake in that respect.

            Show
            pmuir Pete Muir added a comment - Actually reading the spec again we should only fire these events for discovered classes. WELD-485 was a mistake in that respect.
            Hide
            swd847 Stuart Douglas added a comment -

            If we stop firing ProcessAnnotatedType events for types added through BeforeBeanDiscovery.addAnnotatedType it will break a lot of functionality to do with XML configuration (among other things), as these classes will not be processed by portable extensions.

            Show
            swd847 Stuart Douglas added a comment - If we stop firing ProcessAnnotatedType events for types added through BeforeBeanDiscovery.addAnnotatedType it will break a lot of functionality to do with XML configuration (among other things), as these classes will not be processed by portable extensions.
            Hide
            pmuir Pete Muir added a comment -

            11.5.5. ProcessAnnotatedType event
            The container must fire an event for each Java class or interface it discovers in a bean archive, before it reads the declared annotations.

            Show
            pmuir Pete Muir added a comment - 11.5.5. ProcessAnnotatedType event The container must fire an event for each Java class or interface it discovers in a bean archive, before it reads the declared annotations.
            Hide
            pmuir Pete Muir added a comment -

            Given the spec says this explicitly, I think we have to stop firing events for BBD.addAnnotatedType, it's not correct, and these extensions won't be portable. We can address this in CDI 1.1 if you file an issue.

            Show
            pmuir Pete Muir added a comment - Given the spec says this explicitly, I think we have to stop firing events for BBD.addAnnotatedType, it's not correct, and these extensions won't be portable. We can address this in CDI 1.1 if you file an issue.

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                marius.bogoevici Marius Bogoevici
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development