Skip to content

Commit

Permalink
Fix CLDRConverter to generate "java.time.long.Eras" for Gregorian Cal…
Browse files Browse the repository at this point in the history
…endar
  • Loading branch information
naotoj committed Nov 2, 2023
1 parent e9328c8 commit ad1ce04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,9 @@ private void adjustEraNames(Map<String, Object> map, Map<String, Object> pMap, C
value = new String[] {"", value[0]};
break;
}
if (!key.equals(realKey)) {
map.put(realKey, value);
map.put("java.time." + realKey, value);
}

map.put(realKey, value);
map.put("java.time." + realKey, value);
}
realKeys[index] = realKey;
eraNames[index++] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected Set<String> createLanguageTagSet(String category) {
return switch (category) {
case "BreakIteratorInfo", "BreakIteratorRules", "CollationData"
-> super.createLanguageTagSet(category);
case "FormatData" -> Set.of("ja-JP", "ja", "und");
case "FormatData" -> Set.of("ja", "und");
default -> Set.of("und");
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ public String getTextResourcesPackage() {
// Default preference list.
typeList.add(Type.CLDR);
}

// always append FALLBACK
typeList.add(Type.FALLBACK);

adapterPreference = Collections.unmodifiableList(typeList);

// Emit logs, if any, after 'adapterPreference' is initialized which is needed
Expand Down

0 comments on commit ad1ce04

Please sign in to comment.