a4e53d
# Patch based on fix in JDK8 tree by Yuka Kamiya from Oracle:
a4e53d
# http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f114bddac6d6
a4e53d
a4e53d
diff -up ./sun/tools/javazic/Mappings.java.sav ./sun/tools/javazic/Mappings.java
a4e53d
--- ./sun/tools/javazic/Mappings.java.sav	2011-11-03 16:31:53.000000000 -0400
a4e53d
+++ ./sun/tools/javazic/Mappings.java	2011-11-03 16:41:44.000000000 -0400
a4e53d
@@ -77,15 +77,17 @@ class Mappings {
a4e53d
 	    int rawOffset = zone.get(zone.size()-1).getGmtOffset();
a4e53d
 	    // If the GMT offset of this Zone will change in some
a4e53d
 	    // future time, this Zone is added to the exclude list.
a4e53d
-	    if (zone.size() > 1) {
a4e53d
-		ZoneRec zrec = zone.get(zone.size()-2);
a4e53d
+	    boolean isExcluded = false;
a4e53d
+	    for (int i = 0; i < zone.size(); i++) {
a4e53d
+		ZoneRec zrec = zone.get(i);
a4e53d
 		if ((zrec.getGmtOffset() != rawOffset)
a4e53d
 		    && (zrec.getUntilTime(0) > Time.getCurrentTime())) {
a4e53d
 		    if (excludeList == null) {
a4e53d
 			excludeList = new ArrayList<String>();
a4e53d
 		    }
a4e53d
 		    excludeList.add(zone.getName());
a4e53d
-		    continue;
a4e53d
+		    isExcluded = true;
a4e53d
+		    break;
a4e53d
 		}
a4e53d
 	    }
a4e53d
 
a4e53d
@@ -101,9 +103,13 @@ class Mappings {
a4e53d
 		rawOffsetsIndex.add(i, rawOffset);
a4e53d
 
a4e53d
 		Set<String> perRawOffset = new TreeSet<String>();
a4e53d
+		if (!isExcluded) {
a4e53d
+		    perRawOffset = new TreeSet<String>();
a4e53d
+		}
a4e53d
+
a4e53d
 		perRawOffset.add(zonename);
a4e53d
 		rawOffsetsIndexTable.add(i, perRawOffset);
a4e53d
-	    } else {
a4e53d
+	    } else if (!isExcluded) {
a4e53d
 		int i = rawOffsetsIndex.indexOf(new Integer(rawOffset));
a4e53d
 		Set<String> perRawOffset = rawOffsetsIndexTable.get(i);
a4e53d
 		perRawOffset.add(zonename);