diff --git a/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/BeanEventAssignabilityTest.java b/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/BeanEventAssignabilityTest.java index 01c7593fd..0f0becc2d 100644 --- a/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/BeanEventAssignabilityTest.java +++ b/impl/src/main/java/org/jboss/cdi/tck/tests/beanContainer/assignability/BeanEventAssignabilityTest.java @@ -50,6 +50,7 @@ public static WebArchive createTestArchive() { @Test @SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "aa") + @SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "af") public void testBeanMatching() { Set beanTypes = Set.of(MyBean.class, MyBeanInterface.class, Object.class); @@ -181,7 +182,7 @@ public void testEventMatching() { } @Test - @SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "ba") + @SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "bf") public void testEventMatchingDefaultQualifier() { assertTrue(getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(), MyEvent.class, Set.of(Default.Literal.INSTANCE)), "Event with no qualifiers should match when @Default required"); @@ -239,7 +240,7 @@ public void testEventMatchingTypeVarException() { @Test @SpecAssertion(section = BM_BEAN_EVENT_ASSIGNABILITY, id = "be") public void testEventMatchingNonQualifiersException() { - assertThrows("An eventQualfiers annotation not a qualifier", IllegalArgumentException.class, + assertThrows("A specifiedQualifiers annotation not a qualifier", IllegalArgumentException.class, () -> getCurrentBeanContainer().isMatchingEvent(MyEvent.class, Set.of(Qualifier1.Literal.INSTANCE, NonQualifier.Literal.INSTANCE), MyEvent.class, Set.of())); assertThrows("An observedEventQualfiers annotation not a qualifier", IllegalArgumentException.class, diff --git a/impl/src/main/resources/tck-audit-cdi.xml b/impl/src/main/resources/tck-audit-cdi.xml index fc7def04d..0d7b86f3e 100644 --- a/impl/src/main/resources/tck-audit-cdi.xml +++ b/impl/src/main/resources/tck-audit-cdi.xml @@ -7027,43 +7027,51 @@ - Callers of |BeanManager.isMatchingBean| do not need to include implied qualifiers |Default|, |Any|. These will be automatically added where - applicable. + The set of |beanQualifiers| is considered to always include |@Any| and also include |@Default| when it contains no other qualifier but + |@Any| and |@Named|. |BeanManager.isMatchingBean| throws |IllegalArgumentException| if any of the arguments are null. Types in |beanTypes| that are not legal bean types are ignored. + + The set of |beanTypes| is considered to always include |java.lang.Object|. + The method |BeanContainer.isMatchingEvent()| provides access to assignability rules defined in Observer Resolution. - The method |BeanManager.isMatchingEvent| returns true if an event object with given type and qualifiers would match an observer method with - given observed event type and observed event qualifiers, false otherwise. + |BeanManager.isMatchingEvent| returns |true| if an event with given specified type and specified qualifiers would match an observer method + with given observed event type and observed event qualifiers, |false| otherwise. - - Callers of |BeanManager.isMatchingEvent| do not need to include the implied qualifier |Any|. It will be automatically added where - applicable. - + The set of event qualifiers is considered to always include |@Any| |BeanManager.isMatchingEvent| throws |IllegalArgumentException| if any of the arguments are null. - |BeanManager.isMatchingEvent| throws |IllegalArgumentException| if |eventObjectType| contains an unresolved type variable. + |BeanManager.isMatchingEvent| throws |IllegalArgumentException| if |specifiedType| contains a type variable. - |BeanManager.isMatchingEvent| throws |IllegalArgumentException| if any of |eventQualifiers| or |observedEventQualifiers| is not a - qualifier annotation. + + |BeanManager.isMatchingEvent| throws |IllegalArgumentException| if any of |specifiedQualifiers| or |observedEventQualifiers| is not a + qualifier annotation. + + + + An empty set of |specifiedQualifiers| is considered to match the set of |observedEventQualifiers| which contains |@Default|.