From a76d75cdb4c52635197c17e0a7be041361a3036d Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Tue, 30 Jan 2024 21:51:27 +0100 Subject: [PATCH] Improve precision of BeanContainer.isMatchingEvent() javadoc, to be squashed before merging --- .../jakarta/enterprise/inject/spi/BeanContainer.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/BeanContainer.java b/api/src/main/java/jakarta/enterprise/inject/spi/BeanContainer.java index f2c90030..92acbb1d 100644 --- a/api/src/main/java/jakarta/enterprise/inject/spi/BeanContainer.java +++ b/api/src/main/java/jakarta/enterprise/inject/spi/BeanContainer.java @@ -285,11 +285,12 @@ boolean isMatchingBean(Set beanTypes, Set beanQualifiers, Type * match an observer method with given observed event type and observed event qualifiers, * {@code false} otherwise. *

- * In line with the specification for events and observer resolution, the event type used is - * the {@code specifiedType} and the set of event qualifiers used is a set that contains all - * {@code specifiedQualifiers} and {@code @Any}. Also, this method returns {@code true} when - * {@code observedEventQualifiers} contains {@code @Default} and the set of {@code specifiedQualifiers} - * is empty. + * For the purpose of observer resolution, the {@code specifiedType} is used as the event type + * (type of the event object) and {@code specifiedQualifiers} are used as event qualifiers. + * In line with the specification for events and observer resolution, the set of event qualifiers + * it considered to always include {@code @Any}. Also, this method returns {@code true} when + * the types match, the set of {@code observedEventQualifiers} contains {@code @Default} and + * the set of {@code specifiedQualifiers} is empty. *

* Throws {@link IllegalArgumentException} if any of the arguments is {@code null}, * if the {@code specifiedType} contains a type variable, or if any of the {@code specifiedQualifiers}