changeset 181:1aca482dba53

7902304: Fix 'throws' clause with subclassing exceptions
author dbessono
date Wed, 05 Sep 2018 13:43:07 +0100
parents 5626ea3de1c4
children cc572fa65b25
files src/com/sun/javatest/WorkDirectory.java
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/javatest/WorkDirectory.java	Wed Sep 05 01:27:58 2018 +0100
+++ b/src/com/sun/javatest/WorkDirectory.java	Wed Sep 05 13:43:07 2018 +0100
@@ -577,9 +577,6 @@
                 if (!(wdID == null ? "" : wdID).equals(tsID == null ? "" : tsID))
                     throw new MismatchFault(i18n, "wd.mismatchID", canonDir);
 
-            }   // try
-            catch (FileNotFoundException e) {
-                throw new BadDirectoryFault(i18n, "wd.noTestSuiteFile", canonDir);
             } catch (IOException e) {
                 throw new BadDirectoryFault(i18n, "wd.badTestSuiteFile", canonDir, e);
             } catch (TestSuite.Fault e) {
@@ -1181,15 +1178,15 @@
         return result;
     }
 
-    private static Map<String, String> loadTestSuiteInfo(File jtData) throws FileNotFoundException, IOException {
+    private static Map<String, String> loadTestSuiteInfo(File jtData) throws IOException {
         return loadInfo(jtData, TESTSUITE);
     }
 
-    private static Map<String, String> loadWdInfo(File jtData) throws FileNotFoundException, IOException {
+    private static Map<String, String> loadWdInfo(File jtData) throws IOException {
         return loadInfo(jtData, WD_INFO);
     }
 
-    private static Map<String, String> loadInfo(File jtData, String name) throws FileNotFoundException, IOException {
+    private static Map<String, String> loadInfo(File jtData, String name) throws IOException {
         try (InputStream in = new BufferedInputStream(new FileInputStream(new File(jtData, name)))) {
             return PropertyUtils.load(in);
         }