Skip to content

Commit

Permalink
Improve specification of error conditions of `BeanManager.isMatchingB…
Browse files Browse the repository at this point in the history
…ean()` and `isMatchingEvent()`
  • Loading branch information
Ladicek committed Jan 23, 2024
1 parent 45b911d commit 5816d22
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,15 @@ public interface BeanContainer {
* <p>
* In line with the specification for beans and typesafe resolution, the set of
* {@code beanTypes} is considered to always include {@code java.lang.Object}.
* Types in {@code beanTypes} that are not legal bean types are ignored.
* The set of {@code beanQualifiers} is considered to always include {@code @Any} and
* also include {@code @Default} when it contains no other qualifier but {@code @Any}
* and {@code @Named}. The set of {@code requiredQualifiers} is considered to include
* {@code @Default} when it is empty.
* <p>
* Throws {@link IllegalArgumentException} if any of the arguments is {@code null}.
* Throws {@link IllegalArgumentException} if any of the arguments is {@code null}
* or if any of the {@code beanQualifiers} or {@code requiredQualifiers} is not
* a qualifier annotation.
*
* @param beanTypes bean types of a bean; must not be {@code null}
* @param beanQualifiers qualifiers of a bean; must not be {@code null}
Expand All @@ -284,7 +287,9 @@ boolean isMatchingBean(Set<Type> beanTypes, Set<Annotation> beanQualifiers, Type
* In line with the specification for events and observer resolution, the set of
* {@code eventQualifiers} is considered to always include {@code @Any}.
* <p>
* Throws {@link IllegalArgumentException} if any of the arguments is {@code null}.
* Throws {@link IllegalArgumentException} if any of the arguments is {@code null},
* if the {@code eventType} contains an unresolved type variable, or if any of
* the {@code eventQualifiers} or {@code observedEventQualifiers} is not a qualifier annotation.
*
* @param eventType type of an event object; must not be {@code null}
* @param eventQualifiers event qualifiers; must not be {@code null}
Expand Down

0 comments on commit 5816d22

Please sign in to comment.