RFR: 8351443: Improve robustness of StringBuilder [v5]
Roger Riggs
rriggs at openjdk.org
Tue May 6 15:29:18 UTC 2025
On Tue, 6 May 2025 15:19:09 GMT, Johannes Graham <duke at openjdk.org> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Refactor to consistently use `isLatin1(coder)` within AbstractStringBuilder.
>
> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 2101:
>
>> 2099: }
>> 2100:
>> 2101: private AbstractStringBuilder repeat(char c, int count) {
>
> How about renaming the `count` parameter here so that it is obviously distinct from the meaning of `count` elsewhere in this class.
Yes, that's a bit unfortunate overloading of the parameter name as defined in the public `repeat` methods.
Maybe that can be considered more fully in a separate PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24967#discussion_r2075727565
More information about the core-libs-dev
mailing list