test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java
changeset 58528 d0519b8bd8d9
parent 58310 81134def991d
child 58679 9c3209ff7550
child 58990 7f1d2c3a99da
--- a/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java	Wed Oct 09 16:35:44 2019 -0700
+++ b/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java	Wed Oct 09 16:42:18 2019 -0700
@@ -611,7 +611,7 @@
 
     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 @@
         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 @@
                 }
                 try {
                     findAllClassesAtPath(entry, list);
-                } catch (Throwable t) {}
+                } catch (Exception ex) {}
             }
         }
     }