RFR: 8198317: Enhance JavacTool.getTask for flexibility [v3]
Guoxiong Li
github.com+13688759+lgxbslgx at openjdk.java.net
Tue Dec 29 08:10:57 UTC 2020
On Tue, 29 Dec 2020 03:34:21 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 82:
>
>> 80:
>> 81: // Situation: out is null and the value is not set in the context.
>> 82: ByteArrayOutputStream bais = new ByteArrayOutputStream();
>
> The variable name `bais` is "surprising". Is it a cut-n-paste from elsewhere? I was expecting to see `baos` as an acronym for "byte array output stream", `bais` suggests "byte array input stream".
Fixed. I used `ByteArrayInputStream bais = new ByteArrayInputStream();` at the beginning. Then I identified the `ByteArrayInputStream` is not right and changed to use `ByteArrayOutputStream`. But I forgot to revise the variable name `bais`. Sorry for wasting the time at this careless detail.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1896
More information about the compiler-dev
mailing list