On Tue, 25 Apr 2023 01:44:14 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
> When appending a `CharBuffer`, perform a specific check for buffer overflow > before invoking `put()`. Can you add a test to test/jdk/java/nio/Buffer/Basic-X.java.template, I think this regression was missed because this tests didn't check this case. src/java.base/share/classes/java/nio/X-Buffer.java.template line 2050: > 2048: // > 2049: // pre-emptively check for overflow as > put(int,CharBuffer,int,int) > 2050: // would throw IndexOutOfBoundsException instead The comment is confusing, I think you just want to say that the append method throws BufferOverflowException when there is insufficient space in the buffer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13632#issuecomment-1521217228 PR Review Comment: https://git.openjdk.org/jdk/pull/13632#discussion_r1176057894