--- old/test/jdk/valhalla/valuetypes/ObjectMethods.java 2019-05-15 13:58:15.251891802 -0400 +++ new/test/jdk/valhalla/valuetypes/ObjectMethods.java 2019-05-15 13:58:14.879889957 -0400 @@ -33,7 +33,6 @@ import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.List; -import java.util.Objects; import java.util.stream.Stream; import org.testng.annotations.BeforeTest; @@ -141,13 +140,13 @@ .setReference(new Object()).build(); // this is sensitive to the order of the returned fields from Class::getDeclaredFields return new Object[][]{ - { P1, hash(Point.class.asValueType(), 1, 2) }, - { LINE1, hash(Line.class.asValueType(), Point.makePoint(1, 2), Point.makePoint(3, 4)) }, + { P1, hash(Point.class, 1, 2) }, + { LINE1, hash(Line.class, Point.makePoint(1, 2), Point.makePoint(3, 4)) }, { v, hash(hashCodeComponents(v))}, - { Point.makePoint(0,0), hash(Point.class.asValueType(), 0, 0) }, - { Point.default, hash(Point.class.asValueType(), 0, 0) }, - { MyValue1.default, hash(MyValue1.class.asValueType(), Point.default, null) }, - { MyValue1.make(0,0, null), hash(MyValue1.class.asValueType(), Point.makePoint(0,0), null) }, + { Point.makePoint(0,0), hash(Point.class, 0, 0) }, + { Point.default, hash(Point.class, 0, 0) }, + { MyValue1.default, hash(MyValue1.class, Point.default, null) }, + { MyValue1.make(0,0, null), hash(MyValue1.class, Point.makePoint(0,0), null) }, }; } @@ -157,7 +156,7 @@ } private static Object[] hashCodeComponents(Object o) { - Class type = o.getClass().asValueType(); + Class type = o.getClass(); // filter static fields and synthetic fields Stream fields = Arrays.stream(type.getDeclaredFields()) .filter(f -> !Modifier.isStatic(f.getModifiers()) && !f.isSynthetic()) @@ -181,7 +180,7 @@ static inline class MyValue1 { Point p = Point.default; - Point? box = Point.default; + Point? box = null; static MyValue1 make(int x, int y, Point? box) { MyValue1 v = MyValue1.default;