RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v6]

Markus KARG duke at openjdk.org
Fri Apr 18 12:37:49 UTC 2025


On Fri, 18 Apr 2025 06:03:36 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Markus KARG has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Applied changes requested by Chen and Jaikiran: Unit tests for default implementation of CharSequence.getChars() and for CharBuffer.getChars()
>
> test/jdk/java/nio/CharBuffer/GetChars.java line 34:
> 
>> 32:  * @run testng GetChars
>> 33:  */
>> 34: public class GetChars {
> 
> The tests for buffers, including CharBuffer, are in test/jdk/java/nio/Buffer. Look at the existing Chars.java tests idea, and specifically the DataProvider "createCharBuffers" as it will show the different kinds of CharBuffers that can be tested.

Thank you for this tip, Alan! I have move the unit test from `nio/CharBuffer` to `nio/Buffer`, and appended it with the randomized test found in `Buffer/Chars.java`. Hope it looks fine now?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21730#discussion_r2050562477


More information about the nio-dev mailing list