8231529: [TESTBUG] runtime/cds/appcds/dynamicArchive/DynamicLotsOfClasses.java shouldn't wrap SkippedException into Exception
Removed the try-catch in the test. Reviewed-by: iklam, lfoltan
This commit is contained in:
parent
4a41f86a39
commit
1a3f40f25d
@ -39,7 +39,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class LotsOfClasses {
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
public static void main(String[] args) throws Exception {
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
TestCommon.findAllClasses(list);
|
||||
|
||||
|
@ -611,7 +611,7 @@ public class TestCommon extends CDSTestUtils {
|
||||
|
||||
static Pattern pattern;
|
||||
|
||||
static void findAllClasses(ArrayList<String> list) throws Throwable {
|
||||
static void findAllClasses(ArrayList<String> list) throws Exception {
|
||||
// Find all the classes in the jrt file system
|
||||
pattern = Pattern.compile("/modules/[a-z.]*[a-z]+/([^-]*)[.]class");
|
||||
FileSystem fs = FileSystems.getFileSystem(URI.create("jrt:/"));
|
||||
@ -619,7 +619,7 @@ public class TestCommon extends CDSTestUtils {
|
||||
findAllClassesAtPath(base, list);
|
||||
}
|
||||
|
||||
private static void findAllClassesAtPath(Path p, ArrayList<String> list) throws Throwable {
|
||||
private static void findAllClassesAtPath(Path p, ArrayList<String> list) throws Exception {
|
||||
try (DirectoryStream<Path> stream = Files.newDirectoryStream(p)) {
|
||||
for (Path entry: stream) {
|
||||
Matcher matcher = pattern.matcher(entry.toString());
|
||||
@ -629,7 +629,7 @@ public class TestCommon extends CDSTestUtils {
|
||||
}
|
||||
try {
|
||||
findAllClassesAtPath(entry, list);
|
||||
} catch (Throwable t) {}
|
||||
} catch (Exception ex) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,22 +45,16 @@ import java.util.ArrayList;
|
||||
|
||||
public class DynamicLotsOfClasses extends DynamicArchiveTestBase {
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
public static void main(String[] args) throws Exception {
|
||||
runTest(DynamicLotsOfClasses::testDefaultBase);
|
||||
}
|
||||
|
||||
static void testDefaultBase() throws Exception {
|
||||
String topArchiveName = getNewArchiveName("top");
|
||||
try {
|
||||
doTest(topArchiveName);
|
||||
} catch (Throwable th) {
|
||||
System.out.println(th.toString());
|
||||
Exception ex = new Exception(th);
|
||||
throw ex;
|
||||
}
|
||||
doTest(topArchiveName);
|
||||
}
|
||||
|
||||
private static void doTest(String topArchiveName) throws Throwable {
|
||||
private static void doTest(String topArchiveName) throws Exception {
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
TestCommon.findAllClasses(list);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user