RFR: 8306959: (bf) CharBuffer.append(CharSequence,int,int) throws BufferOverflowException where IndexOutOfBoundsException expected

Brian Burkhalter bpb at openjdk.org
Wed Apr 26 23:02:55 UTC 2023


In `java.nio.CharBuffer::append(CharSequence csq, int start, int end)`, the `start` and `end` parameters need to be validated against the preconditions specified by `Appendable::append(CharSequence csq, int start, int end)` before they are used to determine whether a buffer overflow condition exists.

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

Commit messages:
 - 8306959: (bf) CharBuffer.append(CharSequence,int,int) throws BufferOverflowException where IndexOutOfBoundsException expected

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

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


More information about the nio-dev mailing list