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

Justin Lu jlu at openjdk.org
Thu Feb 8 09:29:55 UTC 2024


On Wed, 7 Feb 2024 15:18:09 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

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

I'll limit this package-private method to only `NumberFormat`, since the other eligible XXFormat classes, `DateFormat` and `ListFormat` both utilize a style enum and thus such a method is not needed for them, as we can just iterate through the style enum values.

Since `NumberFormats` style enum only applies to compactNumberInstances, it can't be used in a similar fashion.

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

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


More information about the i18n-dev mailing list