RFR 8180410: ByteArrayOutputStream should not throw IOExceptions
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Mar 15 21:52:50 UTC 2018
On Mar 15, 2018, at 8:56 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> On Mar 15, 2018, at 7:33 AM, Roger Riggs <Roger.Riggs at Oracle.com> wrote:
>
>> BAOS.java:
>>
>> line 163: ok but I don't think I would keep using the expanded 'byte array output stream" phrase
>> instead of the proper noun: ByteArrayOutputStream. (except for consistency)
>
> I don’t like it either: I was just maintaining consistency (as you observed the other usages).
Changed “byte array output stream” globally to {@code ByteArratOutputStream}."
>> In the Write.java test:
>>
>> line 60: Probably "-" in the message should be "--" for consistency
>>
>> line 68: Add the "e" Throwable to the thrown RuntimeException so it gets printed in a stack trace/message
>>
>> Line 100:.. If this was a testng test, the Assert.assertEquals messages would conveniently
>> print expected and actual values. I'd suggest converting it to use @run testng.
>>
>> (Though I expect after these are debugged, they will never fail).
>>
>> 73: some formatting cleanup of the old code might be useful. (spaces around "=")
>
> Will update.
Converted to TestNG and fixed all the above. Also replaced initialization of the local Random variable to use RandomFactory.
Updated patch: http://cr.openjdk.java.net/~bpb/8180410/webrev.01/.
Thanks,
Brian
More information about the core-libs-dev
mailing list