<i18n dev> RFR: 8273491: java.util.spi.LocaleServiceProvider spec contains statement that is too strict

Joe Wang joehw at openjdk.java.net
Fri Sep 10 18:14:49 UTC 2021


On Thu, 9 Sep 2021 23:29:24 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> Small spec clarification. Corresponding CSR has also been drafted.

src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java line 120:

> 118:  * the locale sensitive services separated by a comma. It is only read and cached at
> 119:  * the initialization of this class, so the later call to
> 120:  * {@link System#setProperty(String, String)} may not affect the order.

I wonder if we can be clearer as "may not" implies uncertainty. While it indeed may or may not work due to the timing of the initialization of this class, my understanding of the above statement is that it implied the runtime startup is recommended as it provides assurance. Would it be better to put that in the statement? sth. like: It is read once and cached at the Java runtime startup or initialization of this class. A call after the initialization of this class will not affect the order.

There's still uncertainty

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

PR: https://git.openjdk.java.net/jdk/pull/5457


More information about the i18n-dev mailing list