RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]

Justin Lu jlu at openjdk.org
Tue Sep 10 22:56:06 UTC 2024


On Tue, 10 Sep 2024 22:39:38 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> 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?
>
> It would otherwise scan all files under the directory, and fails with `iso3166.tab` or `zone.tab`, which include "LI" as the country code at the beginning of the line, that interfere with "Link" match.
> Having said that, the default list was different from the one in `TzdbZoneRulesProvider`. I removed extra file names.

Right, the match in general is much more lenient now, so need to restrict the files searched for false positives. Thanks for the explanation, that makes sense.

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

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


More information about the core-libs-dev mailing list