Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v17]

2024-07-18 Thread lingjun-cg
On Mon, 8 Jul 2024 16:31:23 GMT, Naoto Sato  wrote:

>> Quick question about the violation of the "This is equivalent to" spec: Does 
>> our new implementation lead to any observable side effects that make the 
>> returned results or thrown exceptions different from that of `format(obj, 
>> new StringBuffer(), new FieldPosition(0)).toString()`?
>> 
>> In the ClassFile API, there are similar "behave as if" notes such as 
>> https://github.com/openjdk/jdk/blob/3f37c5718d676b7001e6a084aed3ba645745a144/src/java.base/share/classes/java/lang/classfile/ClassFile.java#L433-L438,
>>  yet we don't restrict implementations as the API surface, including the 
>> return an exception result and side effects are the same.
>
>> Quick question about the violation of the "This is equivalent to" spec: Does 
>> our new implementation lead to any observable side effects that make the 
>> returned results or thrown exceptions different from that of `format(obj, 
>> new StringBuffer(), new FieldPosition(0)).toString()`?
>> 
>> In the ClassFile API, there are similar "behave as if" notes such as
>> 
>> https://github.com/openjdk/jdk/blob/3f37c5718d676b7001e6a084aed3ba645745a144/src/java.base/share/classes/java/lang/classfile/ClassFile.java#L433-L438
>> 
>> , yet we don't restrict implementations as the API surface, including the 
>> return an exception result and side effects are the same.
> 
> AFAIK, there will be no behavioral difference, but I think CSR has to be 
> accompanied with this issue to remove that wording, because it is not correct 
> anymore.

@naotoj The CSR has been approved. Is it enough to start new review process?

-

PR Comment: https://git.openjdk.org/jdk/pull/19513#issuecomment-2237844937


Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v17]

2024-07-08 Thread lingjun-cg
On Mon, 8 Jul 2024 17:31:53 GMT, Justin Lu  wrote:

> I believe the `static MessageFormat.format(...` also has similar incorrect 
> "this is equivalent ..." wording, if you could please include that as well. I 
> think we should also rename the issue (and CSR) as well since the scope has 
> changed. Something along the lines of "Use StringBuilder internally for 
> java.text.Format.* formatting".

Thanks for checking carefully. Updated.

-

PR Comment: https://git.openjdk.org/jdk/pull/19513#issuecomment-2216286724