-
Bug
-
Resolution: Won't Fix
-
P3
-
repo-valhalla
See
http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/
http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/ConsistencyTest.jtr
In this versions of the test, we have 2 classes that disagree on whether Point is a Value Type:
class InvokeMethodHandle {
public static void run() throws Throwable {
MethodHandles.Lookup lookup = MethodHandles.lookup();
MethodType mt = MethodType.methodType(Point.class);
MethodHandle mh = lookup.findStatic(CorrectProvider.class, "getNullPoint", mt);
InvokeMethodHandle_mismatched.test(mh);
}
}
class InvokeMethodHandle_mismatched {
static void test(MethodHandle mh) throws Throwable {
Point p = (Point)mh.invoke();
System.out.println("(should not get here) Point = " + p);
}
}
mh.invoke should throw an IncompatibleClassChangeException. However, as indicated by the above ConsistencyTest.jtr file, the ICCE was not thrown.
http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/
http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/ConsistencyTest.jtr
In this versions of the test, we have 2 classes that disagree on whether Point is a Value Type:
class InvokeMethodHandle {
public static void run() throws Throwable {
MethodHandles.Lookup lookup = MethodHandles.lookup();
MethodType mt = MethodType.methodType(Point.class);
MethodHandle mh = lookup.findStatic(CorrectProvider.class, "getNullPoint", mt);
InvokeMethodHandle_mismatched.test(mh);
}
}
class InvokeMethodHandle_mismatched {
static void test(MethodHandle mh) throws Throwable {
Point p = (Point)mh.invoke();
System.out.println("(should not get here) Point = " + p);
}
}
mh.invoke should throw an IncompatibleClassChangeException. However, as indicated by the above ConsistencyTest.jtr file, the ICCE was not thrown.