RFR: 8361715: (bf) Improve java/nio/Buffer/GetChars.java and migrate to JUnit [v11]

Alan Bateman alanb at openjdk.org
Mon Jul 28 14:11:07 UTC 2025


On Fri, 25 Jul 2025 18:47:21 GMT, Brett Okken <duke at openjdk.org> wrote:

>> junit for CharSequence behavior of CharBuffer covering different CharBuffer implementations in various states (offset, position, limit)
>
> Brett Okken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   code review comments

test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java line 93:

> 91:     }
> 92: 
> 93:     static List<Arguments> charBufferArguments() {

This needs a clear comment to say what it returns, or many we should split it so we have more than one method source.

test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java line 227:

> 225:     @ParameterizedTest(name="{4}")
> 226:     @MethodSource("charBufferArguments")
> 227:     void testGetCharsNegativeSourceBeg(CharSequence actual, char[] expected, int start, int stop, String description) {

The parameter that is being tested here is "srcBegin" so maybe using that naming instead of switching to "SourceBeg" (same comment for several other methods).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26282#discussion_r2236634766
PR Review Comment: https://git.openjdk.org/jdk/pull/26282#discussion_r2236645458


More information about the nio-dev mailing list