From 7355517a94510887ea710884e03cf296d720cd74 Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Mon, 26 Feb 2024 13:55:28 +0100 Subject: [PATCH] Revert incorrect change in ambiguity resolution We previously [1] changed wording in the ambiguity resolution specification from > Return an `Iterator`, that iterates over the set of contextual references > for the resulting beans and required type, as defined in <>. to > Return an `Iterator`, that iterates over the set of contextual references > for the resulting beans, as defined in <>. This was an attempt to simplify the text, but is in fact incorrect, because a contextual reference is always determined by the bean and the bean type. This commit reverts to the previous wording. [1] https://github.com/jakartaee/cdi/commit/74827d2808a4db73d1402206a8e116b5702d031a --- spec/src/main/asciidoc/core/injectionandresolution.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/src/main/asciidoc/core/injectionandresolution.asciidoc b/spec/src/main/asciidoc/core/injectionandresolution.asciidoc index 69ec4565..ef2c5df4 100644 --- a/spec/src/main/asciidoc/core/injectionandresolution.asciidoc +++ b/spec/src/main/asciidoc/core/injectionandresolution.asciidoc @@ -672,7 +672,7 @@ The `iterator()` method must: * If typesafe resolution results in an unsatisfied dependency, the set of resulting beans is empty. If typesafe resolution results in an ambiguous dependency and the set of candidate beans contains at least one alternative, the set of resulting beans contains all beans that were not eliminated during ambiguity resolution. If typesafe resolution results in an ambiguous dependency and the set of candidate beans contains no alternative, the set of resulting beans contains all candidate beans. -* Return an `Iterator`, that iterates over the set of contextual references for the resulting beans, as defined in <>. +* Return an `Iterator`, that iterates over the set of contextual references for the resulting beans and required type, as defined in <>. The `stream()` method must: @@ -680,7 +680,7 @@ The `stream()` method must: * If typesafe resolution results in an unsatisfied dependency, the set of resulting beans is empty. If typesafe resolution results in an ambiguous dependency and the set of candidate beans contains at least one alternative, the set of resulting beans contains all beans that were not eliminated during ambiguity resolution. If typesafe resolution results in an ambiguous dependency and the set of candidate beans contains no alternative, the set of resulting beans contains all candidate beans. -* Return a `Stream`, that can stream over the set of contextual references for the resulting beans, as defined in <>. +* Return a `Stream`, that can stream over the set of contextual references for the resulting beans and required type, as defined in <>. The methods `isUnsatisfied()`, `isAmbiguous()` and `isResolvable()` must: