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

Stephen Colebourne scolebourne at openjdk.org
Mon Sep 16 19:00:17 UTC 2024


On Tue, 10 Sep 2024 22:42:37 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.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   tz files aligned with the default TzdbZoneRulesProvider list

make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java line 308:

> 306:             if (off < tokens.length) {
> 307:                 String dayRule = tokens[off++];
> 308:                 if (dayRule.regionMatches(true, 0, "last", 0, 4)) {

This isn't correct, as per the mailing list:

> > can "last" contain uppercase letters, or
> > does it have to be exactly "last"?
> 
> In that case the name is "lastSunday", and it can be abbreviated
> "lastSu" or "Lastsu" or "LASTSUNDA" or whatever.

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

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


More information about the build-dev mailing list