On Fri, 14 Jun 2024 03:28:58 GMT, lingjun-cg <d...@openjdk.org> wrote:
>> I second Justin's suggestion here. The change should benefit every >> implementation in the JDK, not only NumberFormat. Also, I might suggest >> renaming the new class, as it is kind of long/redundant. How about using >> something as simple as "StringBuf"? > >> I second Justin's suggestion here. The change should benefit every >> implementation in the JDK, not only NumberFormat. Also, I might suggest >> renaming the new class, as it is kind of long/redundant. How about using >> something as simple as "StringBuf"? > > Thanks for your comment. The long name bother me for a while. I have changed > it to ""StringBuf". > Hi @lingjun-cg > > Thanks for your work here. > > While this would benefit the performance of NumberFormat subclasses, we are > hoping that if we are going to make the internal switch to StringBuilder, we > can also make similar changes to other Format subclasses as well where > applicable. So, we would want `isInternalSubclass()` to be defined at the > Format level. Some methods that I can immediately think of would be `String > DateFormat.format(Date date)`, `String ListFormat.format(List<String> input)` > and, `String MessageFormat.format(Object obj)`. > > I believe @naotoj shares the same sentiment. Yes, that is what I would expect in this change. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19513#issuecomment-2174184666