Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Revert incorrect change in ambiguity resolution
We previously [1] changed the ambiguity resolution wording from
to
At that time, we did not add a rule to the CDI Full section that would
cover alternatives selected for the bean archive.
Note that for a bean to be eligible, it must be available for injection,
and an alternative is available for injection only if it is selected (for
application in CDI Lite; for application or for bean archive in CDI Full).
Alternative beans that are not selected are hence not even considered during
ambiguity resolution, so the ambiguity resolution description does not need
to mention them at all. This is why the previous description is correct.
Now, only eliminating beans that are not alternatives selected for application,
as the new text says, would mean that in CDI Full, beans that are alternatives
selected for bean archive would also be eliminated. That would be wrong.
Therefore, this change is incorrect. Of course, no implementation actually
made that change in behavior, and the TCK wasn't adjusted either.
There are 2 ways to fix this: revert to previous wording, or add extra wording
to the CDI Full section:
This would be similar how ambiguous name resolution is specified.
This commit simply reverts to the previous wording, because that's easier,
even though it leads to slight inconsistency between ambiguous dependency
resolution and ambiguous name resolution. That inconsistency exists since
CDI 1.1, so is not an issue.
[1] 1840939
Fix the definition of availability for injection
We previously [2] changed the definition of availability for injection
from
to
in the CDI Lite section of the specification. The CDI Full section has
the original wording verbatim, so it does not have an issue.
The new wording is clearly wrong though, because the it mixes the 2nd and
3rd clause of the original sentence. What we should have done is to only
remove the 2nd clause:
This commit does that.
[2] 693139b