<i18n dev> RFR: JDK-8318761: MessageFormat pattern support for CompactNumberFormat, ListFormat, and DateTimeFormatter [v4]

Roger Riggs rriggs at openjdk.org
Wed Feb 7 15:20:58 UTC 2024


On Wed, 7 Feb 2024 00:48:30 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> 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?

Just moving the if...then... else code to a package-private static method in the respective XXFormat class would work the same.
I had not thought of an addition to the spi to delegate to/through the provider.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17663#discussion_r1481637904


More information about the i18n-dev mailing list