8233579: DateFormatSymbols.getShortMonths() return wrong string on es_CL, es_CO locales
authornaoto
Thu, 07 Nov 2019 10:06:04 -0800
changeset 58969 a4430bb9f97d
parent 58968 7f1daafda27b
child 58970 027e4cb87353
child 58972 dc998d4a227e
8233579: DateFormatSymbols.getShortMonths() return wrong string on es_CL, es_CO locales Reviewed-by: joehw
make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
test/jdk/sun/text/resources/LocaleData.cldr
test/jdk/sun/text/resources/LocaleDataTest.java
--- a/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java	Thu Nov 07 16:18:02 2019 +0000
+++ b/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java	Thu Nov 07 10:06:04 2019 -0800
@@ -391,26 +391,23 @@
     }
 
     private void handleMultipleInheritance(Map<String, Object> map, Map<String, Object> parents, String key) {
-        String formatKey = key + "/format";
-        Object format = map.get(formatKey);
+        String formatMapKey = key + "/format";
+        Object format = map.get(formatMapKey);
         if (format != null) {
-            map.remove(formatKey);
+            map.remove(formatMapKey);
             map.put(key, format);
-            if (fillInElements(parents, formatKey, format)) {
+            if (fillInElements(parents, formatMapKey, format)) {
                 map.remove(key);
             }
         }
-        String standaloneKey = key + "/stand-alone";
-        Object standalone = map.get(standaloneKey);
+        String standaloneMapKey = key + "/stand-alone";
+        Object standalone = map.get(standaloneMapKey);
         if (standalone != null) {
-            map.remove(standaloneKey);
-            String realKey = key;
-            if (format != null) {
-                realKey = "standalone." + key;
-            }
-            map.put(realKey, standalone);
-            if (fillInElements(parents, standaloneKey, standalone)) {
-                map.remove(realKey);
+            map.remove(standaloneMapKey);
+            String standaloneResourceKey = "standalone." + key;
+            map.put(standaloneResourceKey, standalone);
+            if (fillInElements(parents, standaloneMapKey, standalone)) {
+                map.remove(standaloneResourceKey);
             }
         }
     }
--- a/test/jdk/sun/text/resources/LocaleData.cldr	Thu Nov 07 16:18:02 2019 +0000
+++ b/test/jdk/sun/text/resources/LocaleData.cldr	Thu Nov 07 10:06:04 2019 -0800
@@ -8382,3 +8382,9 @@
 CalendarData/zh_SG/firstDayOfWeek=1: AG AS AU BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW;2: 001 AD AI AL AM AN AR AT AX AZ BA BE BG BM BN BY CH CL CM CR CY CZ DE DK EC EE ES FI FJ FO FR GB GE GF GP GR HR HU IE IS IT KG KZ LB LI LK LT LU LV MC MD ME MK MN MQ MY NL NO NZ PL RE RO RS RU SE SI SK SM TJ TM TR UA UY UZ VA VN XK;6: MV;7: AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY
 CalendarData/zh_TW/firstDayOfWeek=1: AG AS AU BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW;2: 001 AD AI AL AM AN AR AT AX AZ BA BE BG BM BN BY CH CL CM CR CY CZ DE DK EC EE ES FI FJ FO FR GB GE GF GP GR HR HU IE IS IT KG KZ LB LI LK LT LU LV MC MD ME MK MN MQ MY NL NO NZ PL RE RO RS RU SE SI SK SM TJ TM TR UA UY UZ VA VN XK;6: MV;7: AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY
 CalendarData/zh_TW/minimalDaysInFirstWeek=1: 001 GU UM US VI;4: AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GG GI GP GR HU IE IM IS IT JE LI LT LU MC MQ NL NO PL PT RE RU SE SJ SK SM VA
+
+# bug 8233579
+FormatData/es_CL/MonthAbbreviations/8=sep.
+FormatData/es_CL/standalone.MonthAbbreviations/8=sept.
+FormatData/es_CO/MonthAbbreviations/8=sep.
+FormatData/es_CO/standalone.MonthAbbreviations/8=sept.
--- a/test/jdk/sun/text/resources/LocaleDataTest.java	Thu Nov 07 16:18:02 2019 +0000
+++ b/test/jdk/sun/text/resources/LocaleDataTest.java	Thu Nov 07 10:06:04 2019 -0800
@@ -39,7 +39,7 @@
  *      8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
  *      8145136 8145952 8164784 8037111 8081643 7037368 8178872 8185841 8190918
  *      8187946 8195478 8181157 8179071 8193552 8202026 8204269 8202537 8208746
- *      8209775 8221432 8227127 8230284 8231273
+ *      8209775 8221432 8227127 8230284 8231273 8233579
  * @summary Verify locale data
  * @modules java.base/sun.util.resources
  * @modules jdk.localedata