21 Nov
2017
21 Nov
'17
5:16 p.m.
On 21 Nov 2017, at 08:47, Brian Burkhalter <brian.burkhalter@oracle.com> wrote:
On Nov 20, 2017, at 6:32 PM, Paul Sandoz <paul.sandoz@oracle.com <mailto:paul.sandoz@oracle.com>> 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.