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

Brett Okken duke at openjdk.org
Wed Jul 16 11:48:41 UTC 2025


On Wed, 16 Jul 2025 11:40:59 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 conventions

> It looks like some of the range tests and the char get test overlap with ... `GetChars`

My intent was to be able to replace `GetChars`. I interpreted the linked [comment](https://github.com/openjdk/jdk/pull/26104#discussion_r2182361518) in the jira to express a desire to test the various edges of getChars with a broader set of `CharBuffer` implementations, which is what this test sets up for the testing parameters.

I did not carry forward the randomization of content, positions, limits, etc. because I prefer avoiding randomness in tests when it does not seem strictly required/valuable.

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

PR Comment: https://git.openjdk.org/jdk/pull/26282#issuecomment-3078214677


More information about the nio-dev mailing list