< prev index next >
make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
Print this page
*** 432,442 ****
parseLDMLFile(new File(SPPL_SOURCE_FILE), handlerSuppl);
Map<String, Object> parentData = handlerSuppl.getData("root");
parentData.keySet().stream()
.filter(key -> key.startsWith(PARENT_LOCALE_PREFIX))
.forEach(key -> {
! parentLocalesMap.put(key, new TreeSet(
Arrays.asList(((String)parentData.get(key)).split(" "))));
});
// Parse numberingSystems to get digit zero character information.
handlerNumbering = new NumberingSystemsParseHandler();
--- 432,442 ----
parseLDMLFile(new File(SPPL_SOURCE_FILE), handlerSuppl);
Map<String, Object> parentData = handlerSuppl.getData("root");
parentData.keySet().stream()
.filter(key -> key.startsWith(PARENT_LOCALE_PREFIX))
.forEach(key -> {
! parentLocalesMap.put(key, new TreeSet<String>(
Arrays.asList(((String)parentData.get(key)).split(" "))));
});
// Parse numberingSystems to get digit zero character information.
handlerNumbering = new NumberingSystemsParseHandler();
*** 479,489 ****
canonicalTZMap.put(ids[i], ids[0]);
}
});
}
! private static void parseLDMLFile(File srcfile, AbstractLDMLHandler handler) throws Exception {
info("..... Parsing " + srcfile.getName() + " .....");
SAXParserFactory pf = SAXParserFactory.newInstance();
pf.setValidating(true);
SAXParser parser = pf.newSAXParser();
enableFileAccess(parser);
--- 479,489 ----
canonicalTZMap.put(ids[i], ids[0]);
}
});
}
! private static void parseLDMLFile(File srcfile, AbstractLDMLHandler<?> handler) throws Exception {
info("..... Parsing " + srcfile.getName() + " .....");
SAXParserFactory pf = SAXParserFactory.newInstance();
pf.setValidating(true);
SAXParser parser = pf.newSAXParser();
enableFileAccess(parser);
*** 572,582 ****
/**
* Translate the aliases into the real entries in the bundle map.
*/
static void handleAliases(Map<String, Object> bundleMap) {
! Set bundleKeys = bundleMap.keySet();
try {
for (String key : aliases.keySet()) {
String targetKey = aliases.get(key);
if (bundleKeys.contains(targetKey)) {
bundleMap.putIfAbsent(key, bundleMap.get(targetKey));
--- 572,582 ----
/**
* Translate the aliases into the real entries in the bundle map.
*/
static void handleAliases(Map<String, Object> bundleMap) {
! Set<String> bundleKeys = bundleMap.keySet();
try {
for (String key : aliases.keySet()) {
String targetKey = aliases.get(key);
if (bundleKeys.contains(targetKey)) {
bundleMap.putIfAbsent(key, bundleMap.get(targetKey));
*** 1156,1169 ****
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
}
private static Stream<String> pluralRulesStream() {
return handlerPlurals.getData().entrySet().stream()
! .filter(e -> !((Map<String, String>)e.getValue()).isEmpty())
.map(e -> {
String loc = e.getKey();
! Map<String, String> rules = (Map<String, String>)e.getValue();
return " {\"" + loc + "\", \"" +
rules.entrySet().stream()
.map(rule -> rule.getKey() + ":" + rule.getValue().replaceFirst("@.*", ""))
.map(String::trim)
.collect(Collectors.joining(";")) + "\"},";
--- 1156,1169 ----
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
}
private static Stream<String> pluralRulesStream() {
return handlerPlurals.getData().entrySet().stream()
! .filter(e -> !(e.getValue()).isEmpty())
.map(e -> {
String loc = e.getKey();
! Map<String, String> rules = e.getValue();
return " {\"" + loc + "\", \"" +
rules.entrySet().stream()
.map(rule -> rule.getKey() + ":" + rule.getValue().replaceFirst("@.*", ""))
.map(String::trim)
.collect(Collectors.joining(";")) + "\"},";
< prev index next >