8064914: tzdb.dat compilation failure when using tzdata2014j
Reviewed-by: sherman, coffeys
--- a/jdk/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java Sun Nov 16 15:03:46 2014 +0100
+++ b/jdk/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java Mon Nov 17 14:11:08 2014 +0300
@@ -95,7 +95,17 @@
obj = zones.get(zoneId);
}
if (obj == null) {
- throw new ZoneRulesException("Unknown time-zone ID: " + zoneId0);
+ // Timezone link can be located in 'backward' file and it
+ // can refer to another link, so we need to check for
+ // link one more time, before throwing an exception
+ String zoneIdBack = zoneId;
+ if (links.containsKey(zoneId)) {
+ zoneId = links.get(zoneId);
+ obj = zones.get(zoneId);
+ }
+ if (obj == null) {
+ throw new ZoneRulesException("Unknown time-zone ID: " + zoneIdBack);
+ }
}
}
if (obj instanceof ZoneRules) {