< prev index next >
test/runtime/defineAnonClass/NestedUnsafe.java
Print this page
@@ -37,11 +37,10 @@
import java.security.ProtectionDomain;
import java.io.InputStream;
import java.lang.*;
import jdk.test.lib.*;
import jdk.internal.misc.Unsafe;
-import jdk.test.lib.unsafe.UnsafeHelper;
// Test that an anonymous class in package 'p' cannot define its own anonymous class
// in another package.
public class NestedUnsafe {
@@ -52,11 +51,11 @@
" public static void concat(String one, String two) throws Throwable { " +
" System.out.println(one + two);" +
" } } ");
public static void main(String args[]) throws Exception {
- Unsafe unsafe = UnsafeHelper.getUnsafe();
+ Unsafe unsafe = Unsafe.getUnsafe();
// The anonymous class calls defineAnonymousClass creating a nested anonymous class.
byte klassbuf2[] = InMemoryJavaCompiler.compile("p.TestClass2",
"package p; " +
"import jdk.internal.misc.Unsafe; " +
< prev index next >