changeset 4585:f114bddac6d6

7090844: Support a timezone whose offset is changed more than once in the future Reviewed-by: okutsu
author peytoia
date Thu, 15 Sep 2011 14:45:35 +0900
parents 1260be51581f
children 5e403e9fa34a
files make/tools/src/build/tools/javazic/Mappings.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/tools/src/build/tools/javazic/Mappings.java	Wed Sep 14 22:36:02 2011 -0700
+++ b/make/tools/src/build/tools/javazic/Mappings.java	Thu Sep 15 14:45:35 2011 +0900
@@ -76,8 +76,8 @@
             // If the GMT offset of this Zone will change in some
             // future time, this Zone is added to the exclude list.
             boolean isExcluded = false;
-            if (zone.size() > 1) {
-                ZoneRec zrec = zone.get(zone.size()-2);
+            for (int i = 0; i < zone.size(); i++) {
+                ZoneRec zrec = zone.get(i);
                 if ((zrec.getGmtOffset() != rawOffset)
                     && (zrec.getUntilTime(0) > Time.getCurrentTime())) {
                     if (excludeList == null) {
@@ -85,6 +85,7 @@
                     }
                     excludeList.add(zone.getName());
                     isExcluded = true;
+                    break;
                 }
             }