Skip to content

Commit 23a1952

Browse files
committed
Merge branch 'no-fallback' into version-is-not-age
2 parents 53ee01a + 0b23c2f commit 23a1952

File tree

1 file changed

+14
-7
lines changed
  • unicodetools/src/main/java/org/unicode/text/utility

1 file changed

+14
-7
lines changed

unicodetools/src/main/java/org/unicode/text/utility/Utility.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,13 +1481,20 @@ public static String getMostRecentUnicodeDataFile(
14811481
if (version != null && version.compareTo(currentVersion) < compValue) {
14821482
continue;
14831483
}
1484-
if (version != null
1485-
&& version.compareTo(VersionInfo.UNICODE_4_1) >= 0
1486-
&& currentVersion.compareTo(version) < 0) {
1487-
// Do not look at earlier versions if we want Unicode 4.1 data or later.
1488-
// Unicode 4.0.1 is the last version for which unmodified files were not
1489-
// republished.
1490-
return null;
1484+
if (version != null && currentVersion.compareTo(version) < 0) {
1485+
if (version.compareTo(VersionInfo.UNICODE_4_1) >= 0) {
1486+
// Do not look at earlier versions if we want Unicode 4.1 data or later.
1487+
// Unicode 4.0.1 is the last version for which unmodified files were not
1488+
// republished.
1489+
return null;
1490+
} else {
1491+
// Even back when files were not republished, we copy them.
1492+
throw new IllegalStateException(
1493+
"File "
1494+
+ filename
1495+
+ " should be copied to version directory "
1496+
+ version);
1497+
}
14911498
}
14921499
// check the standard ucd directory
14931500
if (filename.contains("/*/")) {

0 commit comments

Comments
 (0)