[jdk9] (XS) RFR: 8165243: Base64.Encoder.wrap(os).write(byte[], int, int) with incorrect arguments should not produce output

Ivan Gerasimov ivan.gerasimov at oracle.com
Fri Sep 2 16:39:24 UTC 2016


Roger and Alan, thanks for suggestions!

I incorporated most of them:
http://cr.openjdk.java.net/~igerasim/8165243/02/webrev/


>>
>> Is it good to go?
> Using RandomFactory looks okay although more awkward to run the test 
> standalone, I assume rnd should be final.
>
> Since you changing a lot of usages then personally I have input stream 
> named "in" rather than "is" easier to read.
>
But there are also os, baos, bais around, so changing only is to in 
would be inconsistent.

> I agree with Roger on making the exception messages clearer.
Sure, I made them clearer, as suggested.
Hopefully, we won't see them too often :)

> A minor comment but the method names in the test are a bit 
> inconsistent, "Encoder" vs "Enc" for example.
>
Yes, changed to full names and got rid of new checkXXX methods, as they 
weren't really needed.

With kind regards,
Ivan



More information about the core-libs-dev mailing list