<i18n dev> RFR: JDK-8318761: MessageFormat pattern support for CompactNumberFormat, ListFormat, and DateTimeFormatter [v4]
Naoto Sato
naoto at openjdk.org
Wed Feb 7 00:50:58 UTC 2024
On Tue, 6 Feb 2024 23:07:49 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> I agree, it was the existing design that caused for example, CompactNumberFormat to not automatically be supported by MessageFormat. A simple alternative would be storing the potential pre-defined NumberFormats in some data structure that we could just iterate through to feel less “whack a mole” like, but that array would still suffer from the same maintenance issues. I’ll try to think of something better.
>
> One idea would be to delegate to a (package-private) method in the formatXXX class.
> That would localize to the respective class the details.
> (An abstract protected method might be preferred, but its not worth creating extra public API surface area for this).
Would it work with custom implementations for say NumberFormat via the SPI?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17663#discussion_r1480743201
More information about the i18n-dev
mailing list