equal
deleted
inserted
replaced
33 |
33 |
34 import java.security.ProtectionDomain; |
34 import java.security.ProtectionDomain; |
35 import java.io.InputStream; |
35 import java.io.InputStream; |
36 import java.lang.*; |
36 import java.lang.*; |
37 import jdk.test.lib.InMemoryJavaCompiler; |
37 import jdk.test.lib.InMemoryJavaCompiler; |
38 import jdk.test.lib.unsafe.UnsafeHelper; |
|
39 import jdk.internal.misc.Unsafe; |
38 import jdk.internal.misc.Unsafe; |
40 import static jdk.test.lib.Asserts.*; |
39 import static jdk.test.lib.Asserts.*; |
41 |
40 |
42 // package p; |
41 // package p; |
43 |
42 |
48 " public static void concat(String one, String two) throws Throwable { " + |
47 " public static void concat(String one, String two) throws Throwable { " + |
49 " System.out.println(one + two);" + |
48 " System.out.println(one + two);" + |
50 " } } "); |
49 " } } "); |
51 |
50 |
52 public static void main(String args[]) throws Exception { |
51 public static void main(String args[]) throws Exception { |
53 Unsafe unsafe = UnsafeHelper.getUnsafe(); |
52 Unsafe unsafe = Unsafe.getUnsafe(); |
54 |
53 |
55 Class klass = unsafe.defineAnonymousClass(NestedUnsafe.class, klassbuf, new Object[0]); |
54 Class klass = unsafe.defineAnonymousClass(NestedUnsafe.class, klassbuf, new Object[0]); |
56 unsafe.ensureClassInitialized(klass); |
55 unsafe.ensureClassInitialized(klass); |
57 Class[] cArgs = new Class[2]; |
56 Class[] cArgs = new Class[2]; |
58 cArgs[0] = String.class; |
57 cArgs[0] = String.class; |