< prev index next >

test/com/sun/jdi/EarlyReturnTest.java

Print this page
rev 11832 : 8078896: Add @modules as needed to the jdk_svc tests
Reviewed-by: alanb, mchung
   1 /*
   2  * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  *  @test
  26  *  @bug 6175634
  27  *  @summary Allow early return from methods
  28  *
  29  *  @bug 6431720
  30  *  @summary Unexpected InvalidTypeException when call ThreadReference.forceEarlyReturn with VoidValue
  31  *
  32  *  @bug 6432855
  33  *  @summary Need a way to create JDI VoidValue for use in ThreadReference.forceEarlyReturn
  34  *
  35  *  @author Tim Bell (based on MethodExitReturnValuesTest by Jim Holmlund)
  36  *

  37  *  @run build TestScaffold VMConnection TargetListener TargetAdapter
  38  *  @run compile -g EarlyReturnTest.java
  39  *  @run driver EarlyReturnTest
  40  */
  41 import com.sun.jdi.*;
  42 import com.sun.jdi.event.*;
  43 import com.sun.jdi.request.*;
  44 import java.util.*;
  45 import java.net.URLClassLoader;
  46 import java.net.URL;
  47 import java.lang.reflect.Array;
  48 
  49 /*
  50  * This test has a debuggee which calls a static method
  51  * for each kind of JDI Value, and then an instance method
  52  * for each.
  53  *
  54  * The debugger sets breakpoints in all methods.  When a breakpoint
  55  * is hit the debugger requests an early return and supplies a new
  56  * return value.  It then checks that the correct return values are


   1 /*
   2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  *  @test
  26  *  @bug 6175634
  27  *  @summary Allow early return from methods
  28  *
  29  *  @bug 6431720
  30  *  @summary Unexpected InvalidTypeException when call ThreadReference.forceEarlyReturn with VoidValue
  31  *
  32  *  @bug 6432855
  33  *  @summary Need a way to create JDI VoidValue for use in ThreadReference.forceEarlyReturn
  34  *
  35  *  @author Tim Bell (based on MethodExitReturnValuesTest by Jim Holmlund)
  36  *
  37  *  @modules jdk.jdi
  38  *  @run build TestScaffold VMConnection TargetListener TargetAdapter
  39  *  @run compile -g EarlyReturnTest.java
  40  *  @run driver EarlyReturnTest
  41  */
  42 import com.sun.jdi.*;
  43 import com.sun.jdi.event.*;
  44 import com.sun.jdi.request.*;
  45 import java.util.*;
  46 import java.net.URLClassLoader;
  47 import java.net.URL;
  48 import java.lang.reflect.Array;
  49 
  50 /*
  51  * This test has a debuggee which calls a static method
  52  * for each kind of JDI Value, and then an instance method
  53  * for each.
  54  *
  55  * The debugger sets breakpoints in all methods.  When a breakpoint
  56  * is hit the debugger requests an early return and supplies a new
  57  * return value.  It then checks that the correct return values are


< prev index next >