RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files

Justin Lu jlu at openjdk.org
Tue Sep 10 22:20:07 UTC 2024


On Tue, 10 Sep 2024 19:45:01 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> This is a follow on fix to [JDK-8339644](https://bugs.openjdk.org/browse/JDK-8339644). It turned out that TZ data files allow abbreviation of keywords, such as "ZO" for "Zone." Same fix, i.e, replacing `startsWith()` with `regionMatches()` was applied.

make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java line 1375:

> 1373:         Files.walk(Path.of(tzDataDir), 1, FileVisitOption.FOLLOW_LINKS)
> 1374:             .filter(p -> p.toFile().isFile())
> 1375:             .filter(p -> p.getFileName().toString().matches("africa|antarctica|asia|australasia|backward|backzone|etcetera|europe|factory|northamerica|southamerica"))

I am just curious, why is this needed?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20940#discussion_r1752828774


More information about the build-dev mailing list