RFR: 8282819: Deprecate Locale class constructors

Roger Riggs rriggs at openjdk.java.net
Fri Mar 25 16:21:52 UTC 2022


On Thu, 24 Mar 2022 22:01:30 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> Proposing to deprecate the constructors in the `java.util.Locale` class. There is already a factory method and a builder to return singletons, so there is no need to have constructors anymore unless one purposefully wants to create `ill-formed` Locale objects, which is discouraged. We cannot terminally deprecate those constructors for the compatibility to serialized objects created with older JDKs. Please see the draft CSR for more detail.

Given the large number of cleanups, I would have suggested to keep them separate from the change to re-focus the API on factories.

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

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


More information about the serviceability-dev mailing list