]> granicus.if.org Git - icu/commitdiff
ICU-11737 Prevent fallback to the wide form where it shouldn't. Short form should...
authorJohn Emmons <emmo@us.ibm.com>
Tue, 9 Jun 2015 21:26:01 +0000 (21:26 +0000)
committerJohn Emmons <emmo@us.ibm.com>
Tue, 9 Jun 2015 21:26:01 +0000 (21:26 +0000)
X-SVN-Rev: 37516

icu4j/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java

index 74979a460c4de50bf4c08942735b2b90856420bf..92d241aa4b65b5b559ee441c0e17c0b49ce6c475 100644 (file)
@@ -830,9 +830,6 @@ public class MeasureFormat extends UFormat {
             return true;
         }
         T fallback = styleMap.get(FormatWidth.SHORT);
-        if (fallback == null) {
-            fallback = styleMap.get(FormatWidth.WIDE);
-        }
         if (fallback == null) {
             return false;
         }
@@ -1257,7 +1254,7 @@ public class MeasureFormat extends UFormat {
     private static FormatWidth fromFormatWidthOrdinal(int ordinal) {
         FormatWidth[] values = FormatWidth.values();
         if (ordinal < 0 || ordinal >= values.length) {
-            return FormatWidth.WIDE;
+            return FormatWidth.SHORT;
         }
         return values[ordinal];
     }