Skip to content

Commit

Permalink
Fix the definition of availability for injection
Browse files Browse the repository at this point in the history
We previously [1] changed the definition of _availability for injection_
from

> the bean is either not an alternative, or the module is a bean archive
> and the bean is a selected alternative of the bean archive, or the bean
> is a selected alternative of the application

to

> the bean is either not an alternative, or the module is a bean archive
> and the bean is a selected alternative for the application

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:

> the bean is either not an alternative, or the bean is a selected
> alternative of the application

This commit does that.

[1] 693139b
  • Loading branch information
Ladicek committed May 25, 2023
1 parent 3e607bb commit 57b1c2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ A bean is _available for injection_ in a certain module if:

* the bean is not an interceptor
* the bean is enabled,
* the bean is either not an alternative, or the module is a bean archive and the bean is a selected alternative for the application, and
* the bean is either not an alternative, or the bean is a selected alternative for the application, and
* the bean class is required to be accessible to classes in the module, according to the class accessibility requirements of the module architecture.

[[typesafe_resolution]]
Expand Down

0 comments on commit 57b1c2c

Please sign in to comment.