diff --git a/impl/src/main/java/org/jboss/cdi/tck/tests/definition/bean/BeanDefinitionTest.java b/impl/src/main/java/org/jboss/cdi/tck/tests/definition/bean/BeanDefinitionTest.java index f18cf1d387..f67611740f 100644 --- a/impl/src/main/java/org/jboss/cdi/tck/tests/definition/bean/BeanDefinitionTest.java +++ b/impl/src/main/java/org/jboss/cdi/tck/tests/definition/bean/BeanDefinitionTest.java @@ -35,6 +35,7 @@ import jakarta.enterprise.context.RequestScoped; import jakarta.enterprise.inject.spi.Bean; +import jakarta.enterprise.util.TypeLiteral; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.cdi.tck.AbstractTest; import org.jboss.cdi.tck.shrinkwrap.WebArchiveBuilder; @@ -130,7 +131,13 @@ public void testRawBeanTypes() { assertTrue(bean.getTypes().contains(MyRawBean.class)); assertTrue(bean.getTypes().contains(MyBean.class)); assertTrue(bean.getTypes().contains(MyInterface.class)); - assertTrue(bean.getTypes().contains(MySuperInterface.class)); + + // CDI isn't clear whereas we should get MySuperInterface with or without Number parameter. + // It assumes JLS must be followed to determine the list of super types + // JLS isn't clear itself and Java implementations either. So we need to keep it open and support both + // https://bugs.openjdk.org/browse/JDK-8044366 + assertTrue(bean.getTypes().contains(MySuperInterface.class) + || bean.getTypes().contains(new TypeLiteral>() {}.getType())); assertTrue(bean.getTypes().contains(Object.class)); }