> On 21 Nov 2017, at 08:47, Brian Burkhalter <[email protected]> > wrote: > > > On Nov 20, 2017, at 6:32 PM, Paul Sandoz <[email protected] > <mailto:[email protected]>> wrote: > >> See also Objects.checkFromIndexSize if you wanna use that instead. >> >> Also the if len == 0 check is probably redundant, i doubt it makes any >> difference given the condition needs to be checked before entering the loop. > > Both good points. Updated accordingly: > http://cr.openjdk.java.net/~bpb/8191516/webrev.01/ > <http://cr.openjdk.java.net/~bpb/8191516/webrev.01/>. >
Looks good. How about updating the read method as well to use the bounds check method? (the len == 0 check makes sense there)? Paul.
