RFR: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern [v5]
Archie Cobbs
acobbs at openjdk.org
Fri Jan 26 21:40:35 UTC 2024
On Fri, 26 Jan 2024 21:28:47 GMT, Justin Lu <jlu at openjdk.org> wrote:
>>> The "can be used to create" seems conditional.
>>
>> It is conditional - in the sense that you don't _have_ to use it to create a new instance of `MessageFormat`. You can also use it for something else, in other words.
>>
>> But I also understand how it comes across as a bit wishy-washy...
>>
>> Hmm, what do you think about this wording?
>>
>>
>> @implSpec The implementation in {@link MessageFormat} returns a string that,
>> when passed to the {@link MessageFormat(String)} constructor, produces an
>> instance that is semantically equivalent to this instance.
>
> Not sure which wording will ultimately be used, but if the wording ends up including the constructor, it's probably worth mentioning the `applyPattern` method as well.
Good point... maybe this?
@implSpec The implementation in {@link MessageFormat} returns a string that, when passed
to a {@code MessageFormat()} constructor or {@link #applyPattern applyPattern()}, produces
an instance that is semantically equivalent to this instance.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17416#discussion_r1468170808
More information about the core-libs-dev
mailing list