From ddc4c1d612ea1830791b41541d05945764c6eac9 Mon Sep 17 00:00:00 2001 From: macchiati Date: Tue, 27 Feb 2024 16:14:17 -0800 Subject: [PATCH] CLDR-17339 Fix problem in ChartDeltaDtds that was skipping keyboard3 --- .../main/java/org/unicode/cldr/tool/ChartDtdDelta.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ChartDtdDelta.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ChartDtdDelta.java index 75fae0f3db1..079b896d475 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ChartDtdDelta.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ChartDtdDelta.java @@ -152,7 +152,9 @@ public void writeContents(FormattedFileWriter pw) throws IOException { String firstVersion = type.firstVersion; // FIRST_VERSION.get(type); if (firstVersion != null && current != null - && current.compareTo(firstVersion) < 0) { + && VersionInfo.getInstance(current) + .compareTo(VersionInfo.getInstance(firstVersion)) + < 0) { // skip if current is too old to have “type” continue; } @@ -174,7 +176,11 @@ public void writeContents(FormattedFileWriter pw) throws IOException { continue; } DtdData dtdLast = null; - if (last != null && (firstVersion == null || last.compareTo(firstVersion) >= 0)) { + if (last != null + && (firstVersion == null + || VersionInfo.getInstance(last) + .compareTo(VersionInfo.getInstance(firstVersion)) + >= 0)) { // only read if last isn’t too old to have “type” dtdLast = DtdData.getInstance(type, last); }