test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java
changeset 48979 514c73a1955b
parent 48469 7312ae4465d6
child 49739 00805b129186
--- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java	Thu Feb 15 09:22:25 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java	Wed Feb 14 07:08:25 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,16 +73,14 @@
         argsList.add("useAppLoader");
         String[] opts = new String[argsList.size()];
         opts = argsList.toArray(opts);
-        OutputAnalyzer runOutput = TestCommon.execCommon(opts);
-        TestCommon.checkExec(runOutput, "appLoader found method main");
+        TestCommon.run(opts).assertNormalExit("appLoader found method main");
 
         // case 2: load class in bootclasspath using boot loader
         argsList.remove(argsList.size() - 1);
         argsList.add("useBootLoader");
         opts = new String[argsList.size()];
         opts = argsList.toArray(opts);
-        runOutput = TestCommon.execCommon(opts);
-        TestCommon.checkExec(runOutput, EXPECTED_EXCEPTION);
+        TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);
 
         // case 3: load class in bootclasspath using app loader with '--limit-modules java.base'
         argsList.add(0, "--limit-modules");
@@ -91,16 +89,13 @@
         argsList.add("useAppLoader");
         opts = new String[argsList.size()];
         opts = argsList.toArray(opts);
-        runOutput = TestCommon.execCommon(opts);
-        TestCommon.checkExec(runOutput, EXPECTED_EXCEPTION);
+        TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);
 
         // case 4: load class in bootclasspath using boot loader with '--limit-modules java.base'
         argsList.remove(argsList.size() - 1);
         argsList.add("useBootLoader");
         opts = new String[argsList.size()];
         opts = argsList.toArray(opts);
-        runOutput = TestCommon.execCommon(opts);
-        TestCommon.checkExec(runOutput, EXPECTED_EXCEPTION);
-
+        TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);
     }
 }