Skip to content

Commit 9187b58

Browse files
committed
meow
1 parent 0b23c2f commit 9187b58

File tree

1 file changed

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

1 file changed

+15
-14
lines changed

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,20 +1451,13 @@ public static String getMostRecentUnicodeDataFile(
14511451
if (version != null && version.compareTo(currentVersion) < compValue) {
14521452
continue;
14531453
}
1454-
if (version != null && currentVersion.compareTo(version) < 0) {
1455-
if (version.compareTo(VersionInfo.UNICODE_4_1) >= 0) {
1456-
// Do not look at earlier versions if we want Unicode 4.1 data or later.
1457-
// Unicode 4.0.1 is the last version for which unmodified files were not
1458-
// republished.
1459-
return null;
1460-
} else {
1461-
// Even back when files were not republished, we copy them.
1462-
throw new IllegalStateException(
1463-
"File "
1464-
+ filename
1465-
+ " should be copied to version directory "
1466-
+ version);
1467-
}
1454+
if (version != null
1455+
&& currentVersion.compareTo(version) < 0
1456+
&& version.compareTo(VersionInfo.UNICODE_4_1) >= 0) {
1457+
// Do not look at earlier versions if we want Unicode 4.1 data or later.
1458+
// Unicode 4.0.1 is the last version for which unmodified files were not
1459+
// republished.
1460+
return null;
14681461
}
14691462
// check the standard ucd directory
14701463
if (filename.contains("/*/")) {
@@ -1496,6 +1489,14 @@ public static String getMostRecentUnicodeDataFile(
14961489
// TODO: Consider generally switching from using File to using the newer Path.
14971490
result = searchDirectory(path.toFile(), filename, show, fileType);
14981491
if (result != null) {
1492+
if (version != null && currentVersion.compareTo(version) < 0) {
1493+
// Even back when files were not republished, we copy them.
1494+
throw new IllegalStateException(
1495+
"File "
1496+
+ filename
1497+
+ " should be copied to version directory "
1498+
+ version);
1499+
}
14991500
break;
15001501
}
15011502
}

0 commit comments

Comments
 (0)