--- old/test/runtime/valhalla/valuetypes/VboxUnbox.java 2017-09-07 12:13:11.938830178 -0400 +++ new/test/runtime/valhalla/valuetypes/VboxUnbox.java 2017-09-07 12:13:10.833848355 -0400 @@ -78,6 +78,9 @@ catch (ClassCastException cce) {} catch (Throwable t) { fail("Invokation Exception", t); } + // With -verify, this test will yield a VerifyError + // since the constant pool entry at the index is not a + // symbolic reference to a direct value class type. MethodHandle unbox = unboxMh(vcc, String.class); // Illegal unbox type try { unbox.invoke(ValueCapableClass.create()); @@ -90,8 +93,6 @@ /* Create new DVT via loading a value array element. Why this workaround: 1) to avoid "ValueType.defaultValueConstant()" which may or may not be implemented with vunbox - 2) vnew requires valuefactory attribute, which at the time of writing isn't generated with the DVT - 3) vdefault doesn't exist at the time of writing */ public static MethodHandle newDvtMh(Class dvt) { return MethodHandleBuilder.loadCode(MethodHandles.lookup(), "newDvt", MethodType.methodType(dvt), CODE->{