RFR: 8198317: Enhance JavacTool.getTask for flexibility [v3]

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Tue Dec 29 08:05:17 UTC 2020


On Tue, 29 Dec 2020 03:31:08 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revise test.
>
> test/langtools/tools/javac/api/8198317/T8198317.java line 90:
> 
>> 88:                 .call();
>> 89:         tb.checkEqual(expected, Arrays.asList(bais.toString().split(lineSeparator)));
>> 90:         System.setErr(prev);
> 
> Although not strictly necessary in this case, it is good practice to use `try ... finally` to reset values back to some previous value. In other words, the `System.setErr(prev);` should be in the `finally` clause.

Fixed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1896


More information about the compiler-dev mailing list