--- old/test/jdk/sun/misc/UnsafeFieldOffsets.java 2020-03-31 19:14:17.000000000 -0700 +++ new/test/jdk/sun/misc/UnsafeFieldOffsets.java 2020-03-31 19:14:16.000000000 -0700 @@ -65,8 +65,7 @@ try { byte[] bytes = Files.readAllBytes(cf); Class c = MethodHandles.lookup().defineHiddenClass(bytes, true).lookupClass(); - if (!c.isHiddenClass()) - throw new RuntimeException("Expected hidden class: " + c); + assertHiddenClass(c); return c; } catch (IOException e) { throw new UncheckedIOException(e); @@ -110,12 +109,12 @@ } private static void assertNonHiddenClass(Class c) { - if (c.isHiddenClass()) + if (c.isHidden()) throw new RuntimeException("Expected UOE but not thrown: " + c); } private static void assertHiddenClass(Class c) { - if (!c.isHiddenClass()) + if (!c.isHidden()) throw new RuntimeException("Expected hidden class but is not: " + c); } }