UnicodeString *aliasArray;
Hashtable *aliasMap;
if ((aliasArray = (UnicodeString*)arrays.get(*alias)) != NULL) {
- // Clone the array
- int32_t aliasArraySize = arraySizes.geti(*alias);
- LocalArray<UnicodeString> aliasArrayCopy(new UnicodeString[aliasArraySize], errorCode);
- if (U_FAILURE(errorCode)) { return; }
- uprv_arrayCopy(aliasArray, aliasArrayCopy.getAlias(), aliasArraySize);
- // Put the array on the 'arrays' map
UnicodeString *path = (UnicodeString*)aliasPathPairs[i + 1];
- arrays.put(*path, aliasArrayCopy.orphan(), errorCode);
- arraySizes.puti(*path, aliasArraySize, errorCode);
+ if (arrays.get(*path) == NULL) {
+ // Clone the array
+ int32_t aliasArraySize = arraySizes.geti(*alias);
+ LocalArray<UnicodeString> aliasArrayCopy(new UnicodeString[aliasArraySize], errorCode);
+ if (U_FAILURE(errorCode)) { return; }
+ uprv_arrayCopy(aliasArray, aliasArrayCopy.getAlias(), aliasArraySize);
+ // Put the array on the 'arrays' map
+ arrays.put(*path, aliasArrayCopy.orphan(), errorCode);
+ arraySizes.puti(*path, aliasArraySize, errorCode);
+ }
if (U_FAILURE(errorCode)) { return; }
mod = true;
} else if ((aliasMap = (Hashtable*)maps.get(*alias)) != NULL) {
UnicodeString *path = (UnicodeString*)aliasPathPairs[i + 1];
- maps.put(*path, aliasMap, errorCode);
+ if (maps.get(*path) == NULL) {
+ maps.put(*path, aliasMap, errorCode);
+ }
if (U_FAILURE(errorCode)) { return; }
mod = true;
}
CASE(14,Test4104136)
CASE(15,Test4104522)
CASE(16,Test4106807)
- CASE(17,Test4108407)
+ CASE(17,Test4108407)
CASE(18,Test4134203)
CASE(19,Test4151631)
CASE(20,Test4151706)
CASE(30,TestT10619)
CASE(31,TestT10855)
CASE(32,TestT10906)
+ CASE(33,TestT13380)
default: name = ""; break;
}
}
}
}
+void DateFormatRegressionTest::TestT13380(void) {
+ UErrorCode errorCode = U_ZERO_ERROR;
+ LocalPointer<DateFormat> enFmt(DateFormat::createDateInstance(DateFormat::kShort, Locale("en")), errorCode);
+ if (U_FAILURE(errorCode)) {
+ errln("failure creating 'en' DateFormat");
+ }
+
+ errorCode = U_ZERO_ERROR;
+ LocalPointer<DateFormat> tgFmt(DateFormat::createDateInstance(DateFormat::kShort, Locale("tg")), errorCode);
+ if (U_FAILURE(errorCode)) {
+ errln("failure creating 'tg' DateFormat");
+ }
+}
+
#endif /* #if !UCONFIG_NO_FORMATTING */
//eof