Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-17 Thread Chen Liang
On Sat, 17 May 2025 15:04:21 GMT, Markus KARG wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed extraneous "the" > > src/java.base/share/classes/java/lang/StringUTF16.java line 1535: > >> 1533: checkB

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-17 Thread Markus KARG
On Fri, 9 May 2025 16:41:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-09 Thread Brent Christian
On Fri, 9 May 2025 16:41:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-09 Thread Chen Liang
On Fri, 9 May 2025 16:41:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-09 Thread Raffaello Giulietti
On Fri, 9 May 2025 16:41:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-09 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v7]

2025-05-09 Thread Raffaello Giulietti
On Fri, 9 May 2025 13:28:44 GMT, Raffaello Giulietti wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add an assert to inflateToUTF16 method >> Add doc of preconditions to appendChars... methods >> Correct misc

Re: RFR: 8351443: Improve robustness of StringBuilder [v8]

2025-05-09 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-09 Thread Roger Riggs
On Tue, 6 May 2025 16:18:11 GMT, Chen Liang wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply reviewer suggestions for typos, javadoc, and copyright dates. > > src/java.base/share/classes/java/lang/AbstractStrin

Re: RFR: 8351443: Improve robustness of StringBuilder [v7]

2025-05-09 Thread Raffaello Giulietti
On Fri, 9 May 2025 00:20:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v7]

2025-05-08 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-07 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-07 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Jaikiran Pai
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 15:19:09 GMT, Johannes Graham 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/

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Jaikiran Pai
On Tue, 6 May 2025 15:07:25 GMT, Roger Riggs wrote: > > I see that in the proposed changes, we are now using the same names for > > these local variables and method parameters as the field names. Would using > > different names for these local variables be better? To avoid shadowing the > > fi

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 13:59:40 GMT, Jaikiran Pai 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. > > test/jdk/java/lang/StringBuilder/Str

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Johannes Graham
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 13:03:37 GMT, Jaikiran Pai wrote: > I see that in the proposed changes, we are now using the same names for these > local variables and method parameters as the field names. Would using > different names for these local variables be better? To avoid shadowing the > field nam

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 01:38:21 GMT, Jaikiran Pai 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/lan

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Shaojin Wen
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Brent Christian
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v3]

2025-05-05 Thread Roger Riggs
On Fri, 2 May 2025 17:49:20 GMT, Shaojin Wen wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize StringUTF16.putCharsAt a bit. >> Fixup hotspot Helper of putCharsAt to remove return value to match >> StringU

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Jaikiran Pai
On Mon, 5 May 2025 17:58:09 GMT, Roger Riggs wrote: >> In fact, `StringUTF16` and `StringLatin1` are both package-private, so >> technically all their method access modifiers should either be >> package-private or private. > > How about in another PR. None of the `public static ` methods in St

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Roger Riggs
On Mon, 5 May 2025 17:38:55 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/StringUTF16.java line 1531: >> >>> 1529: } >>> 1530: >>> 1531: public static void putCharsAt(byte[] value, int i, char c1, char >>> c2, char c3, char c4) { >> >> Hello Roger, can this (pre-exis

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Chen Liang
On Mon, 5 May 2025 17:34:43 GMT, Jaikiran Pai 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/lan

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Jaikiran Pai
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v4]

2025-05-05 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v3]

2025-05-05 Thread Chen Liang
On Fri, 2 May 2025 17:24:06 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v3]

2025-05-02 Thread Shaojin Wen
On Fri, 2 May 2025 17:24:06 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v3]

2025-05-02 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder [v2]

2025-05-01 Thread Shaojin Wen
On Thu, 1 May 2025 21:08:29 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v2]

2025-05-01 Thread Shaojin Wen
On Thu, 1 May 2025 21:08:29 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v2]

2025-05-01 Thread Shaojin Wen
On Thu, 1 May 2025 21:08:29 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v2]

2025-05-01 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8351443: Improve robustness of StringBuilder

2025-05-01 Thread Hendrik Schick
On Wed, 30 Apr 2025 14:12:36 GMT, Roger Riggs wrote: > Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and wri

Re: RFR: 8351443: Improve robustness of StringBuilder

2025-04-30 Thread Shaojin Wen
On Wed, 30 Apr 2025 14:12:36 GMT, Roger Riggs wrote: > Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and wri

Re: RFR: 8351443: Improve robustness of StringBuilder

2025-04-30 Thread Shaojin Wen
On Wed, 30 Apr 2025 14:12:36 GMT, Roger Riggs wrote: > Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and wri

Re: RFR: 8351443: Improve robustness of StringBuilder

2025-04-30 Thread Chen Liang
On Wed, 30 Apr 2025 14:12:36 GMT, Roger Riggs wrote: > Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and wri

Re: RFR: 8351443: Improve robustness of StringBuilder

2025-04-30 Thread Per Minborg
On Wed, 30 Apr 2025 14:12:36 GMT, Roger Riggs wrote: > Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and wri

RFR: 8351443: Improve robustness of StringBuilder

2025-04-30 Thread Roger Riggs
Refactor AbstractStringBuilder to maintain consistency among count, coder, and value buffers while the buffer capacity is being expanded and/or inflated from Latin1 to UTF16 representations. The refactoring pattern is to read and write AbstractStringBuilder fields once using locals for all inte