mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 02:07:15 +00:00
ICU-8787 Mering the fix for #8734, which was missed in ICU4J 4.8.1.1 release. See ticket#8925.
X-SVN-Rev: 30932
This commit is contained in:
parent
54d529cd2d
commit
5a0cab78aa
1 changed files with 11 additions and 0 deletions
|
@ -548,6 +548,17 @@ public final class ULocale implements Serializable {
|
|||
*/
|
||||
public static ULocale getDefault() {
|
||||
synchronized (ULocale.class) {
|
||||
if (defaultULocale == null) {
|
||||
// When Java's default locale has extensions (such as ja-JP-u-ca-japanese),
|
||||
// Locale -> ULocale mapping requires BCP47 keyword mapping data that is currently
|
||||
// stored in a resource bundle. However, UResourceBundle currently requires
|
||||
// non-null default ULocale. For now, this implementation returns ULocale.ROOT
|
||||
// to avoid the problem.
|
||||
|
||||
// TODO: Consider moving BCP47 mapping data out of resource bundle later.
|
||||
|
||||
return ULocale.ROOT;
|
||||
}
|
||||
Locale currentDefault = Locale.getDefault();
|
||||
if (!defaultLocale.equals(currentDefault)) {
|
||||
defaultLocale = currentDefault;
|
||||
|
|
Loading…
Add table
Reference in a new issue