--- old/test/valhalla/mvt/MVTTest.java 2017-06-22 17:00:09.000000000 -0700 +++ new/test/valhalla/mvt/MVTTest.java 2017-06-22 17:00:09.000000000 -0700 @@ -4,9 +4,7 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -99,9 +97,15 @@ } public void testWither() throws Throwable { + testWither(Point.lookup()); + testWither(MethodHandles.privateLookupIn(VT.boxClass(), LOOKUP)); + testWither(MethodHandles.privateLookupIn(VT.valueClass(), LOOKUP)); + } + + void testWither(MethodHandles.Lookup l ) throws Throwable { for (int i = 0; i < FIELD_NAMES.length; i++) { MethodHandle wither = MethodHandles.collectArguments( - VT.findWither(LOOKUP, FIELD_NAMES[i], FIELD_TYPES[i]), 0, VT.defaultValueConstant()); + VT.findWither(l, FIELD_NAMES[i], FIELD_TYPES[i]), 0, VT.defaultValueConstant()); String expected = TEMPLATE.replace("#" + FIELD_NAMES[i], String.valueOf(FIELD_VALUES[i])) .replaceAll("#[xyz]", "0");