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

Non-deterministic behavior of CDI.current()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 2.0.Beta1
    • None
    • None

    Description

      The behavior of CDI.current() is not deterministic. It uses findAny(). It should use findFirst()

      .findAny().orElseThrow(() -> new IllegalStateException("Unable to access CDI"));

      This also seems to go against what the javadocs say

      otherwise the first provider which can access the container is used.

      Attachments

        Activity

          People

            Unassigned Unassigned
            meetoblivion_jira John Ament (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: