# HG changeset patch # User aefimov # Date 1418763597 -10800 # Node ID d0383a8fa3984ee716dc3e7dd3f88bbdac0781a0 # Parent 270b6925cbc891ace4b2dc8b22e42b76e8d282aa 8051641: Africa/Casablanca transitions is incorrectly calculated starting from 2027 Reviewed-by: sherman diff -r 270b6925cbc8 -r d0383a8fa398 jdk/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java --- a/jdk/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java Tue Dec 16 12:48:31 2014 -0800 +++ b/jdk/make/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java Tue Dec 16 23:59:57 2014 +0300 @@ -758,8 +758,8 @@ if (endYear == Year.MAX_VALUE) { endYear = startYear; lastRules.add(new TransRule(endYear, rule)); - lastRulesStartYear = Math.max(startYear, lastRulesStartYear); } + lastRulesStartYear = Math.max(startYear, lastRulesStartYear); } else { if (endYear == Year.MAX_VALUE) { //endYear = zoneEnd.getYear(); diff -r 270b6925cbc8 -r d0383a8fa398 jdk/test/ProblemList.txt --- a/jdk/test/ProblemList.txt Tue Dec 16 12:48:31 2014 -0800 +++ b/jdk/test/ProblemList.txt Tue Dec 16 23:59:57 2014 +0300 @@ -303,9 +303,6 @@ # jdk_util -# 8051641 -sun/util/calendar/zi/TestZoneInfo310.java generic-all - # 8062512 java/util/spi/ResourceBundleControlProvider/UserDefaultControlTest.java generic-all diff -r 270b6925cbc8 -r d0383a8fa398 jdk/test/sun/util/calendar/zi/Rule.java --- a/jdk/test/sun/util/calendar/zi/Rule.java Tue Dec 16 12:48:31 2014 -0800 +++ b/jdk/test/sun/util/calendar/zi/Rule.java Tue Dec 16 23:59:57 2014 +0300 @@ -126,6 +126,14 @@ }); rules.clear(); for (int i = 0; i < n; i++) { + if (i != 0 && recs[i -1].getSave() == recs[i].getSave()) { + // we have two recs back to back with same saving for the same year. + if (recs[i].isLastRule()) { + continue; + } else if (recs[i - 1].isLastRule()) { + rules.remove(rules.size() - 1); + } + } rules.add(recs[i]); } return rules;