Skip to content

Commit

Permalink
ICU-22856 Fix ICUCurrencyDisplayInfoProvider.fetchUnitPatterns() so t…
Browse files Browse the repository at this point in the history
…hat it doesn't skip inheriting patterns

from root.
  • Loading branch information
richgillam committed Sep 16, 2024
1 parent 688957e commit ee7cc23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ public void TestCurrencyDisplayNames() {
// known currency, behavior unchanged
assertEquals("de_USD_name", "US-Dollar", cdn.getName("USD"));
assertEquals("de_USD_symbol", "$", cdn.getSymbol("USD"));
if (!logKnownIssue("ICU-22856", "Problem with inheritance for plural rules in currencies")) {
assertEquals("de_USD_plural_other", "US-Dollar", cdn.getPluralName("USD", "other"));
}
assertEquals("de_USD_plural_other", "US-Dollar", cdn.getPluralName("USD", "other"));

// known currency but unknown plural category
assertNull("de_USD_plural_foo", cdn.getPluralName("USD", "foo"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ Map<String, String> fetchUnitPatterns() {
Map<String, String> result = unitPatternsCache;
if (result == null) {
result = new HashMap<>();
CurrencySink sink = new CurrencySink(!fallback, CurrencySink.EntrypointTable.CURRENCY_UNIT_PATTERNS);
CurrencySink sink = new CurrencySink(false, CurrencySink.EntrypointTable.CURRENCY_UNIT_PATTERNS);
sink.unitPatterns = result;
rb.getAllItemsWithFallback("CurrencyUnitPatterns", sink);
unitPatternsCache = result;
Expand Down

0 comments on commit ee7cc23

Please sign in to comment.