Title: Message Title
Xiao Ou Sun created an issue
CDI TCK / CDITCK-626
EnvInjectionTest.testResourceBeanTypes() doesn't work with JDK12
Issue Type:
Bug
Affects Versions:
2.0.5.SP1
Assignee:
Matej Novotny
Components:
Tests
Created:
19/Feb/19 7:59 PM
Environment:
Linux x86_64, Weblogic 12c with JDK12
Priority:
Major
Reporter:
Xiao Ou Sun
Error message is: java.lang.AssertionError at org.jboss.cdi.tck.tests.implementation.simple.resource.env.EnvInjectionTest.testResourceBeanTypes(EnvInjectionTest.java:83) The case fails in bean types counting: package org.jboss.cdi.tck.tests.implementation.simple.resource.env; ... public class EnvInjectionTest extends AbstractTest { ... public void testResourceBeanTypes() { @SuppressWarnings("serial") Bean greeting = getBeans(String.class, new AnnotationLiteral() { }).iterator().next(); assert greeting.getTypes().size() == 5; # Line83, assertionError occurs here assert rawTypeSetMatches(greeting.getTypes(), String.class, Object.class, Serializable.class, Comparable.class, CharSequence.class); } } The reason of the issue should be: Before JDK12, class java.lang.String in JavaDoc looks like: Class String java.lang.Object java.lang.String All Implemented Interfaces: Serializable, CharSequence, Comparable But it changed in JDK12: Class String java.lang.Object java.lang.String All Implemented Interfaces: Serializable, CharSequence, Comparable, Constable, ConstantDesc So with JDK12, "greeting.getTypes().size()" is 7 instead of 5, which causes the assertion. Could we add tolerance mechanic for this? Thanks. -X.O.