On Wed, 7 Feb 2024 15:18:09 GMT, Roger Riggs <rri...@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

Reply via email to