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

configureAnnotatedType vs setAnnotatedType restrition is unecessarily strict

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 2.0 .Final
    • Fix Version/s: None
    • Component/s: Portable Extensions
    • Labels:
      None

      Description

      Any observer of this event is permitted to wrap and/or replace the AnnotatedType by calling either setAnnotatedType() or configureAnnotatedType(). If both methods are called within an observer notification an IllegalStateException is thrown.
      

      This rule is way too strict without any real reason.
      Any CDI container must support that both methods are being called on the same event payload anyway. Because we did not forbid that observerMethod1 invokes setAnnotatedType and observerMethod2 uses configureAnnoatedType. And that's good that way, otherwise the pluggability would be lost.

      We should delete this sentence without any substitution.

      The same applies to similar configurator methods like configureBeanAttributes, etc.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: