< prev index next >

test/runtime/Unsafe/PrimitiveHostClass.java

Print this page

        

*** 37,56 **** * @run main/othervm PrimitiveHostClass */ 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); ! } ! } public static void testVMAnonymousClass(Class<?> hostClass) { // choose a class name in the same package as the host class String prefix = packageName(hostClass); --- 37,47 ---- * @run main/othervm PrimitiveHostClass */ public class PrimitiveHostClass { ! static final Unsafe U = Unsafe.getUnsafe(); public static void testVMAnonymousClass(Class<?> hostClass) { // choose a class name in the same package as the host class String prefix = packageName(hostClass);
< prev index next >