hg: code-tools/jtharness: 7902304: Fix 'throws' clause with subclassing exceptions

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Sep 5 15:15:55 UTC 2018


This one I disagree with. I would recommend reverting it.

Yes, FileNotFoundException is a subtype of IOException, but it
is reasonable to handle it differently, as shown in the lines you
have deleted:


- } // 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) {


Notice the error message is different.

-- Jon

On 9/5/18 5:51 AM, dmitry.bessonov at oracle.com wrote:
> Changeset: 1aca482dba53
> Author:    dbessono
> Date:      2018-09-05 13:43 +0100
> URL:       http://hg.openjdk.java.net/code-tools/jtharness/rev/1aca482dba53
>
> 7902304: Fix 'throws' clause with subclassing exceptions
>
> ! src/com/sun/javatest/WorkDirectory.java
>



More information about the jtharness-dev mailing list