RFR: 8216400: improve handling of IOExceptions in JavaCompiler.close() [v2]
Jonathan Gibbons
jjg at openjdk.java.net
Sat Dec 26 16:01:56 UTC 2020
On Sat, 26 Dec 2020 15:46:15 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:
>> Hi all,
>>
>> This little patch enhances the code according to the comment by using a simplest way. I found [JDK-8069116](https://bugs.openjdk.java.net/browse/JDK-8069116) is a similar issue. A better way would be appreciated.
>>
>> Thank you for taking the time to reivew.
>>
>> Best Regards.
>
> Guoxiong Li has updated the pull request incrementally with two additional commits since the last revision:
>
> - Add a test case.
> - Set all exceptions from all the Closeables.
OK. Clever test; well done.
Without the test, I would not personally have approved the work, since I suggested the code. (I would have wanted another set of Reviewer eyes on the suggestion.)
But given the addition of the test to verify the behavior, I think it's OK to go ahead.
test/langtools/tools/javac/fatalErrors/ImproveFatalErrorHandling.java line 87:
> 85: try {
> 86: compiler.close();
> 87: } catch(FatalError fatalError) {
(minor) add space after "catch"
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1895
More information about the compiler-dev
mailing list