equal
deleted
inserted
replaced
37 * @run main/othervm PrimitiveHostClass |
37 * @run main/othervm PrimitiveHostClass |
38 */ |
38 */ |
39 |
39 |
40 public class PrimitiveHostClass { |
40 public class PrimitiveHostClass { |
41 |
41 |
42 static final Unsafe U; |
42 static final Unsafe U = Unsafe.getUnsafe(); |
43 static { |
|
44 try { |
|
45 Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe"); |
|
46 theUnsafe.setAccessible(true); |
|
47 U = (Unsafe) theUnsafe.get(null); |
|
48 } catch (Exception e) { |
|
49 throw new AssertionError(e); |
|
50 } |
|
51 } |
|
52 |
43 |
53 public static void testVMAnonymousClass(Class<?> hostClass) { |
44 public static void testVMAnonymousClass(Class<?> hostClass) { |
54 |
45 |
55 // choose a class name in the same package as the host class |
46 // choose a class name in the same package as the host class |
56 String prefix = packageName(hostClass); |
47 String prefix = packageName(hostClass); |