Re: RFR: 8282819: Deprecate Locale class constructors [v7]

2022-03-29 Thread Naoto Sato
On Tue, 29 Mar 2022 21:28:44 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors [v7]

2022-03-29 Thread Naoto Sato
> 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

Re: RFR: 8282819: Deprecate Locale class constructors [v6]

2022-03-29 Thread Roger Riggs
On Mon, 28 Mar 2022 22:16:43 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-28 Thread Naoto Sato
On Mon, 28 Mar 2022 21:06:35 GMT, Roger Riggs wrote: >> While it is true for completeness, I would limit the addition of new method >> as little as possible, because there are already several ways to obtain a >> Locale object. > > As with other varargs method calls, it is possible to pass an

Re: RFR: 8282819: Deprecate Locale class constructors [v6]

2022-03-28 Thread Naoto Sato
> 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

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-28 Thread Roger Riggs
On Mon, 28 Mar 2022 16:00:14 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/util/Locale.java line 819: >> >>> 817: * @since 19 >>> 818: */ >>> 819: public static Locale of(String... fields) { >> >> Arguably, there should be `Locale.of` overloads taking 0 to 4 

Re: RFR: 8282819: Deprecate Locale class constructors [v5]

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 18:51:30 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors [v4]

2022-03-28 Thread Naoto Sato
On Mon, 28 Mar 2022 17:13:44 GMT, Lance Andersen wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> New unit test. IllegalArgumentException. > > test/jdk/java/util/Locale/TestOf.java line 79: > >> 77: @Test

Re: RFR: 8282819: Deprecate Locale class constructors [v5]

2022-03-28 Thread Naoto Sato
> 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

Re: RFR: 8282819: Deprecate Locale class constructors [v4]

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 17:02:33 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors [v4]

2022-03-28 Thread Naoto Sato
> 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

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-28 Thread Naoto Sato
On Sun, 27 Mar 2022 08:45:01 GMT, ExE Boss wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed a build failure > > src/java.base/share/classes/java/util/Locale.java line 819: > >> 817: * @since 19 >> 818:

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-28 Thread Naoto Sato
On Sat, 26 Mar 2022 11:30:53 GMT, Lance Andersen wrote: > One suggestion As part of the PR, we should probably update > test/jdk/java/util/Locale/LocaleTest.java. or perhaps add a new test for > Locale.of() for completeness. Thanks, Lance. Sure, I will add some new unit tests for the new

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-27 Thread ExE Boss
On Fri, 25 Mar 2022 22:51:23 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-26 Thread Lance Andersen
On Fri, 25 Mar 2022 22:51:23 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-25 Thread Naoto Sato
> 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

Re: RFR: 8282819: Deprecate Locale class constructors [v2]

2022-03-25 Thread Naoto Sato
On Fri, 25 Mar 2022 01:56:33 GMT, Naoto Sato wrote: >> src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java >> line 375: >> >>> 373: (locale.getLanguage().isEmpty() ? "und" : >>> locale.getLanguage()) + >>> 374:

Re: RFR: 8282819: Deprecate Locale class constructors [v2]

2022-03-25 Thread Naoto Sato
> 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

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-25 Thread Naoto Sato
On Fri, 25 Mar 2022 15:37:36 GMT, Roger Riggs 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

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-25 Thread Roger Riggs
On Thu, 24 Mar 2022 22:01:30 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-25 Thread Roger Riggs
On Thu, 24 Mar 2022 22:01:30 GMT, Naoto Sato 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

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-24 Thread Naoto Sato
On Fri, 25 Mar 2022 00:18:54 GMT, Stuart Marks 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

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-24 Thread Stuart Marks
On Thu, 24 Mar 2022 22:01:30 GMT, Naoto Sato 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