hotspot/test/runtime/Unsafe/ThrowException.java
changeset 41092 c388d897472d
parent 40855 3c4c913195e3
equal deleted inserted replaced
41091:de3789bb384e 41092:c388d897472d
    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;