RFR: 8299982: (bf) Buffer.checkIndex(int, int) should use Preconditions.checkIndex(int, int, BiFunction) [v4]
Alan Bateman
alanb at openjdk.org
Thu Jan 26 20:02:18 UTC 2023
On Thu, 26 Jan 2023 18:52:45 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Replace explicit check of indexes in `Buffer::checkIndex(int,int)` with a call to `Objects::checkIndex(int,int)` in order to improve the throughput of other methods which invoke `Buffer::checkIndex(int,int)`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8299982: Change exception formatter to a constant
Latest version looks good. The exception message can be looked at another time and changing the one-arg checkIndex to avoid a confusion message is good too.
-------------
Marked as reviewed by alanb (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12174
More information about the nio-dev
mailing list