--- a/hotspot/test/runtime/Unsafe/PrimitiveHostClass.java Tue Sep 13 21:29:30 2016 +0000
+++ b/hotspot/test/runtime/Unsafe/PrimitiveHostClass.java Wed Sep 14 08:17:50 2016 -0400
@@ -39,16 +39,7 @@
public class PrimitiveHostClass {
- static final Unsafe U;
- static {
- try {
- Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
- theUnsafe.setAccessible(true);
- U = (Unsafe) theUnsafe.get(null);
- } catch (Exception e) {
- throw new AssertionError(e);
- }
- }
+ static final Unsafe U = Unsafe.getUnsafe();
public static void testVMAnonymousClass(Class<?> hostClass) {