RFR: JDK-8322512 StringBuffer.repeat does not work correctly after toString() was called [v2]

Jim Laskey jlaskey at openjdk.org
Thu Jan 4 12:49:48 UTC 2024


On Thu, 21 Dec 2023 07:55:50 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Clear sooner
>
> test/jdk/java/lang/StringBuilder/StringBufferRepeat.java line 138:
> 
>> 136:         sb.repeat('*', 5);
>> 137:         expected = "*****";
>> 138:         assertEquals(expected, sb.toString());
> 
> Hello Jim, just a minor detail - in case of testng's `Assert.assertEquals()` the first param is the `actual` and the second is the `expected`. Some other existing usages of this method in this test also have the incorrect order.

Updated

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17172#discussion_r1441707877


More information about the core-libs-dev mailing list