On Thu, 23 Feb 2023 17:39:10 GMT, Jim Laskey <[email protected]> wrote:
>> Add the ability to repeatedly append char and CharSequence data to
>> StringBuilder/StringBuffer.
>
> Jim Laskey has updated the pull request incrementally with one additional
> commit since the last revision:
>
> PR Cleanup
src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1850:
> 1848: boolean isLatin1 = isLatin1();
> 1849: if (isLatin1 && StringLatin1.canEncode(c)) {
> 1850: while (index < limit) {
while (index != limit) {
is probably safer, in particular if `limit` has overflown to
`Integer.MIN_VALUE`.
Not sure if this could happen, but...
-------------
PR: https://git.openjdk.org/jdk/pull/12728