From 591f3b0253dfcad1972e518b4bc66e73b1275d49 Mon Sep 17 00:00:00 2001 From: Doug Felt Date: Wed, 10 May 2006 23:28:25 +0000 Subject: [PATCH] ICU-5194 fallback to "root" instead of "" X-SVN-Rev: 19623 --- icu4j/src/com/ibm/icu/util/ULocale.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icu4j/src/com/ibm/icu/util/ULocale.java b/icu4j/src/com/ibm/icu/util/ULocale.java index 720427cf9f4..9241bd532b9 100644 --- a/icu4j/src/com/ibm/icu/util/ULocale.java +++ b/icu4j/src/com/ibm/icu/util/ULocale.java @@ -749,6 +749,9 @@ public final class ULocale implements Serializable { if (loc == null) { return null; } + if (loc.toString().length() == 0) { + return ROOT; + } ULocale result = (ULocale)CACHE.get(loc); if (result == null && defaultULocale != null && loc == defaultULocale.locale) { result = defaultULocale;