RFR: 8273491: java.util.spi.LocaleServiceProvider spec contains statement that is too strict [v2]

Naoto Sato naoto at openjdk.java.net
Sat Sep 11 14:02:46 UTC 2021


On Fri, 10 Sep 2021 20:53:35 GMT, Joe Wang <joehw at openjdk.org> wrote:

>> Hi Naoto,
>> 
>> A couple of questions:
>> 
>> - Are there any scenarios where invoking setProperty will not override the command line setting ?
>> - Did you consider an `@ImplNote` for your clarification given the behavior "might" be different in other implementations (I am not sure myself) and is implementation defined?
>> 
>> Best
>> Lance
>
> That sounds good to me, suggesting doing it at launch while discouraging the use of setProperty.

Hi Lance,

> * Are there any scenarios where invoking setProperty will not override the command line setting ?

Yes. For example, if a logger is installed, it formats the log date/time which causes initialization of locale-related classes before the app's main() method invocation, resulting setProperty() having no effect.

> * Did you consider an `@ImplNote` for your clarification given the behavior "might" be different in other implementations (I am not sure myself) and is implementation defined?

As in the above example, the behavior changes regardless of the implementation of the runtime. The clarification is mainly for the API consumer, rather than platform implementors.

Hope this answers your questions.

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

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


More information about the core-libs-dev mailing list