-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b15
Specification for java.util.spi.LocaleServiceProvider
( https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/spi/LocaleServiceProvider.html#java.locale.providers )
says:
========
The search order of locale sensitive services can be configured by using the java.locale.providers system property. This system property declares the user's preferred order for looking up the locale sensitive services separated by a comma. It is only read at the Java runtime startup, so the later call to System.setProperty() won't affect the order.
========
However as experiments show it seems that for OpenJDK programmatic setting of System.setProperty() still affects the implementation behaviour - say if a simple program is started with
-Djava.locale.providers=SPI
and then the program itself calls
System.setProperty("java.locale.providers", "CLDR,COMPAT”)
this would lead to behavior different than the expected SPI-type defined at Java runtime startup.
( https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/spi/LocaleServiceProvider.html#java.locale.providers )
says:
========
The search order of locale sensitive services can be configured by using the java.locale.providers system property. This system property declares the user's preferred order for looking up the locale sensitive services separated by a comma. It is only read at the Java runtime startup, so the later call to System.setProperty() won't affect the order.
========
However as experiments show it seems that for OpenJDK programmatic setting of System.setProperty() still affects the implementation behaviour - say if a simple program is started with
-Djava.locale.providers=SPI
and then the program itself calls
System.setProperty("java.locale.providers", "CLDR,COMPAT”)
this would lead to behavior different than the expected SPI-type defined at Java runtime startup.
- csr for
-
JDK-8273577 java.util.spi.LocaleServiceProvider spec contains statement that is too strict
-
- Closed
-