RFR: 8299982: (bf) Buffer.checkIndex(int, int) should use Objects.checkIndex(int, int)

Brian Burkhalter bpb at openjdk.org
Tue Jan 24 22:18:45 UTC 2023


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)`.

-------------

Commit messages:
 - 8299982: (bf) Buffer.checkIndex(int, int) should use Objects.checkIndex(int, int)

Changes: https://git.openjdk.org/jdk/pull/12174/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12174&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8299982
  Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/12174.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12174/head:pull/12174

PR: https://git.openjdk.org/jdk/pull/12174


More information about the nio-dev mailing list