This program, based on JCK-11 test api/java_lang/reflect/Array/GetSetArrayTests.java, throws an IllegalArgumentException in jdk-latest, but a ClassCastException in lworld:
import java.lang.reflect.*;
public class ArraySet {
public static void main(String argv[]) throws Throwable {
try {
Integer array[] = { new Integer(1), new Integer(2), new Integer(3) };
Array.set( array, 2, new Byte((byte) 5) );
} catch (Exception e) {
System.out.println("e: " + e.toString());
}
}
}
The issue occurs with and without the EnableValhalla option.
import java.lang.reflect.*;
public class ArraySet {
public static void main(String argv[]) throws Throwable {
try {
Integer array[] = { new Integer(1), new Integer(2), new Integer(3) };
Array.set( array, 2, new Byte((byte) 5) );
} catch (Exception e) {
System.out.println("e: " + e.toString());
}
}
}
The issue occurs with and without the EnableValhalla option.
- relates to
-
JDK-8207815 [lworld] JVM_GetArrayElement and,JVM_SetArrayElement don't work for flatten array
-
- Resolved
-
-
JDK-8051447 Improve performance of array reflection
-
- Open
-
- links to
-
Commit(lworld)
openjdk/valhalla/a483e8cd
-
Review(lworld)
openjdk/valhalla/1753