< prev index next >
test/runtime/Unsafe/ThrowException.java
Print this page
*** 28,44 ****
* @modules java.base/jdk.internal.misc
* java.management
* @run main ThrowException
*/
- import jdk.test.lib.unsafe.UnsafeHelper;
import jdk.internal.misc.Unsafe;
import static jdk.test.lib.Asserts.*;
public class ThrowException {
public static void main(String args[]) throws Exception {
! Unsafe unsafe = UnsafeHelper.getUnsafe();
try {
unsafe.throwException(new TestException());
} catch (Throwable t) {
if (t instanceof TestException) {
return;
--- 28,43 ----
* @modules java.base/jdk.internal.misc
* java.management
* @run main ThrowException
*/
import jdk.internal.misc.Unsafe;
import static jdk.test.lib.Asserts.*;
public class ThrowException {
public static void main(String args[]) throws Exception {
! Unsafe unsafe = Unsafe.getUnsafe();
try {
unsafe.throwException(new TestException());
} catch (Throwable t) {
if (t instanceof TestException) {
return;
< prev index next >