tzdata/javazic-exclusion-fix.patch
Troy Dawson a9010d7c75 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/tzdata#58d77a3f15398c4048d0fc300b14157e9c947e15
2020-10-15 13:07:44 -07:00

43 lines
1.5 KiB
Diff

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