RFR 8191516: OutputStream.write(byte[], int, int) could have fewer parameter bounds checks

Paul Sandoz paul.sandoz at oracle.com
Tue Nov 21 21:01:09 UTC 2017



> On 21 Nov 2017, at 12:30, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
> On Nov 21, 2017, at 9:21 AM, Brian Burkhalter <brian.burkhalter at oracle.com <mailto:brian.burkhalter at oracle.com>> wrote:
> 
>>> Looks good. How about updating the read method as well to use the bounds check method? (the len == 0 check makes sense there)?
>> 
>> Probably might as well expand it a little to see where else similar changes might be made.
> 
> Expanded to InputStream: http://cr.openjdk.java.net/~bpb/8191516/webrev.02/ <http://cr.openjdk.java.net/~bpb/8191516/webrev.02/>. The test java/io/InputStream/ReadParams verifies the changes to IS.
> 

+1

Paul.


More information about the core-libs-dev mailing list