Constructor0204 test expects IllegalArgumentException thrown due to wrong parameter type, something like this:
Class params[] = {int.class};
Constructor c = T.class.getConstructor( params );
Object args[] = {int.class};
T ob = (T) (c.newInstance( args ));
But VM throws ClassCastException with no stack trace during the invocation of a method handle when running with -Xcomp in the new core reflection implementation after JEP 416 is integrated. InvocationTargetException wrapping CCE is thrown instead.
Constructor0204: Failed. Constructor0204: unexpected java.lang.reflect.InvocationTargetException thrown
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:72)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
at javasoft.sqe.tests.api.java.lang.reflect.Constructor.CNewInstanceTests.Constructor0204(CNewInstanceTests.java:167)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd$Version2Test.execute(ExecJCKTestSameJVMCmd.java:603)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd$StandardTest.run(ExecJCKTestSameJVMCmd.java:560)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd.execute(ExecJCKTestSameJVMCmd.java:444)
at com.sun.jck.lib.ExecJCKTestSameJVMCmd.run(ExecJCKTestSameJVMCmd.java:374)
at com.sun.jck.lib.ExecInSeparateThreadCmd$StatusCallable.call(ExecInSeparateThreadCmd.java:76)
at com.sun.jck.lib.ExecInSeparateThreadCmd$StatusCallable.call(ExecInSeparateThreadCmd.java:60)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassCastException