8220614: (bf) Buffer absolute slice methods should use Objects.checkFromIndexSize()
Ivan Gerasimov
ivan.gerasimov at oracle.com
Thu Mar 14 00:42:35 UTC 2019
Hi Brian!
While you're there.
It seems that the check at StringCharBuffer, lines 39-41 can also be
simplified as
Object.checkFromToIndex(start, end, s.length());
A few other places (toString, subSequence) in some Buffers could also
benefit from this kind of refactoring.
Or save it for a separate cleanup :)
With kind regards,
Ivan
On 3/13/19 5:19 PM, Brian Burkhalter wrote:
> Please review this simple change to improve parameter bounds checks in
> the recently added absolute slice methods.
>
> Thanks,
>
> Brian
>
> https://bugs.openjdk.java.net/browse/JDK-8220614
> http://cr.openjdk.java.net/~bpb/8220614/webrev.00/
> <http://cr.openjdk.java.net/%7Ebpb/8220614/webrev.00/>
--
With kind regards,
Ivan Gerasimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190313/8db06afb/attachment.html>
More information about the nio-dev
mailing list