<i18n dev> RFR: 8287340: Refactor old code using StringTokenizer in locale related code

Naoto Sato naoto at openjdk.java.net
Tue May 31 17:53:10 UTC 2022


Refactoring some old code in locale providers. The test case data have also been modified due to:
- There's a bug in `LocaleProviderAdapter.toLocaleArray()` where it did not handle the case for `no-NO-NY`.
- `Locale.toLanguageTag()` won't handle legacy Java locales, e.g., `ja_JP_JP` and falls back, so comparing locales using language tags does not work for those locales. Changed to compare with `Locale.toString()` instead.

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

Commit messages:
 - 8287340: Refactor old code using StringTokenizer in locale related code

Changes: https://git.openjdk.java.net/jdk/pull/8960/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8960&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8287340
  Stats: 175 lines in 4 files changed: 6 ins; 61 del; 108 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8960.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8960/head:pull/8960

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


More information about the i18n-dev mailing list