<i18n dev> RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v17]

lingjun-cg duke at openjdk.org
Fri Jul 19 01:28:36 UTC 2024


On Mon, 8 Jul 2024 16:31:23 GMT, Naoto Sato <naoto at openjdk.org> 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


More information about the i18n-dev mailing list