On Mon, 26 Feb 2024 23:37:16 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> This PR intends to remove the legacy `COMPAT` locale data from the JDK. The 
>> `COMPAT` locale data was introduced for applications' migratory purposes 
>> transitioning to `CLDR`. It is becoming a technical debt and now is the time 
>> to remove it (we've been emitting a warning at JVM startup since JDK21, if 
>> the app is using `COMPAT`). A corresponding CSR has also been drafted.
>
> Naoto Sato has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove `GensrcLocaleData.gmk`

Still working on getting a better understanding of all the parts here, but left 
some initial comments.

src/java.base/share/classes/java/util/Locale.java line 57:

> 55: import jdk.internal.vm.annotation.Stable;
> 56: 
> 57: import sun.security.action.GetPropertyAction;

Although trivial change, not sure if the file needs a copyright year bump; not 
exactly sure on the policy here.

src/java.base/share/classes/sun/util/locale/provider/FallbackLocaleProviderAdapter.java
 line 86:

> 84:     @Override
> 85:     // In order to correctly report supported locales
> 86:     public BreakIteratorProvider getBreakIteratorProvider() {

More for my understanding but I am curious why FallbackLocaleProviderAdapter 
has to override `getBreakIteratorProvider`, but can rely on the 
`getCollatorProvider` from JRELocaleProviderAdapter? Also wondering why 
"BreakIteratorRules" is fetched when JRELocaleProviderAdapter fetches 
"FormatData" if the data is the same COMPAT data.

test/jdk/java/text/Format/DateFormat/Bug6683975.java line 27:

> 25:  * @test
> 26:  * @bug 6683975 8008577 8174269
> 27:  * @summary Make sure that date is formatted correctlyin th locale.

not your change and typo doc nit, but,

Suggestion:

 * @summary Make sure that date is formatted correctly in th locale.

test/jdk/java/text/Format/NumberFormat/CurrencyFormat.java line 30:

> 28:  *          Tests both COMPAT and CLDR data.
> 29:  * @modules jdk.localedata
> 30:  * @run junit/othervm -Djava.locale.providers=COMPAT CurrencyFormat

The methods `currencySymbolsTest`, `currencySymbolsDataProvider`, and 
`getFutureSymbol` can be removed since they are for COMPAT only. 

The string array `expectedCOMPATData` can be removed from the data provider 
method `currencyFormatDataProvider` as well as `isCompat` variable and usage.

_CurrencySymbols.properties_ can also be deleted since that is what 
`currencySymbolsDataProvider` uses to build the data and no other tests rely on 
the file.

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

PR Review: https://git.openjdk.org/jdk/pull/17991#pullrequestreview-1901683460
PR Review Comment: https://git.openjdk.org/jdk/pull/17991#discussion_r1503317351
PR Review Comment: https://git.openjdk.org/jdk/pull/17991#discussion_r1503375503
PR Review Comment: https://git.openjdk.org/jdk/pull/17991#discussion_r1503301324
PR Review Comment: https://git.openjdk.org/jdk/pull/17991#discussion_r1503105517

Reply via email to