< prev index next >
test/runtime/defineAnonClass/NestedUnsafe2.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 that gets put in its host's package cannot define
// an anonymous class in another package.
public class NestedUnsafe2 {
@@ -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("TestClass2",
"import jdk.internal.misc.Unsafe; " +
"public class TestClass2 { " +
< prev index next >