< prev index next >

test/jdk/internal/ref/Cleaner/ExitOnThrow.java

Print this page
rev 17272 : 8181391: remove explicit @build actions for the top level testlibary classes
Reviewed-by: duke


  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 4954921 8009259
  27  * @library /test/lib
  28  * @modules java.base/jdk.internal.ref
  29  *          java.base/jdk.internal.misc
  30  * @build jdk.test.lib.*
  31  * @build jdk.test.lib.process.*
  32  * @run main ExitOnThrow
  33  * @summary Ensure that if a cleaner throws an exception then the VM exits
  34  */
  35 import java.util.Arrays;
  36 
  37 import jdk.internal.ref.Cleaner;
  38 import jdk.test.lib.JDKToolLauncher;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 import jdk.test.lib.process.ProcessTools;
  41 
  42 public class ExitOnThrow {
  43 
  44     static final String cp = System.getProperty("test.classes", ".");
  45 
  46     public static void main(String[] args) throws Exception {
  47         if (args.length == 0) {
  48             String[] cmd = JDKToolLauncher.createUsingTestJDK("java")
  49                                           .addToolArg("-cp")
  50                                           .addToolArg(cp)
  51                                           .addToolArg("ExitOnThrow")




  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 4954921 8009259
  27  * @library /test/lib
  28  * @modules java.base/jdk.internal.ref
  29  *          java.base/jdk.internal.misc


  30  * @run main ExitOnThrow
  31  * @summary Ensure that if a cleaner throws an exception then the VM exits
  32  */
  33 import java.util.Arrays;
  34 
  35 import jdk.internal.ref.Cleaner;
  36 import jdk.test.lib.JDKToolLauncher;
  37 import jdk.test.lib.process.OutputAnalyzer;
  38 import jdk.test.lib.process.ProcessTools;
  39 
  40 public class ExitOnThrow {
  41 
  42     static final String cp = System.getProperty("test.classes", ".");
  43 
  44     public static void main(String[] args) throws Exception {
  45         if (args.length == 0) {
  46             String[] cmd = JDKToolLauncher.createUsingTestJDK("java")
  47                                           .addToolArg("-cp")
  48                                           .addToolArg(cp)
  49                                           .addToolArg("ExitOnThrow")


< prev index next >