equal
deleted
inserted
replaced
28 * @modules java.base/jdk.internal.misc |
28 * @modules java.base/jdk.internal.misc |
29 * java.management |
29 * java.management |
30 * @run main ThrowException |
30 * @run main ThrowException |
31 */ |
31 */ |
32 |
32 |
33 import jdk.test.lib.unsafe.UnsafeHelper; |
|
34 import jdk.internal.misc.Unsafe; |
33 import jdk.internal.misc.Unsafe; |
35 import static jdk.test.lib.Asserts.*; |
34 import static jdk.test.lib.Asserts.*; |
36 |
35 |
37 public class ThrowException { |
36 public class ThrowException { |
38 public static void main(String args[]) throws Exception { |
37 public static void main(String args[]) throws Exception { |
39 Unsafe unsafe = UnsafeHelper.getUnsafe(); |
38 Unsafe unsafe = Unsafe.getUnsafe(); |
40 try { |
39 try { |
41 unsafe.throwException(new TestException()); |
40 unsafe.throwException(new TestException()); |
42 } catch (Throwable t) { |
41 } catch (Throwable t) { |
43 if (t instanceof TestException) { |
42 if (t instanceof TestException) { |
44 return; |
43 return; |