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.