On Wed, 7 Feb 2024 00:48:30 GMT, Naoto Sato <na...@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