Blame SOURCES/jdk8274864-remove_amman_cairo_hacks.patch

5aa09a
commit 1b3825db8631e55771fb723d4fcd10040ea15b7e
5aa09a
Author: duke <duke@openjdk.org>
5aa09a
Date:   Wed Apr 12 17:25:27 2023 +0000
5aa09a
5aa09a
    Backport ec199072c5867624d66840238cc8828e16ae8da7
5aa09a
5aa09a
diff --git a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
5aa09a
index 6f6e190efcd..ef278203182 100644
5aa09a
--- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
5aa09a
+++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
5aa09a
@@ -608,34 +608,6 @@ public final class ZoneInfoFile {
5aa09a
                 params[8] = endRule.secondOfDay * 1000;
5aa09a
                 params[9] = toSTZTime[endRule.timeDefinition];
5aa09a
                 dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000;
5aa09a
-
5aa09a
-                // Note: known mismatching -> Asia/Amman
5aa09a
-                // ZoneInfo :      startDayOfWeek=5     <= Thursday
5aa09a
-                //                 startTime=86400000   <= 24 hours
5aa09a
-                // This:           startDayOfWeek=6
5aa09a
-                //                 startTime=0
5aa09a
-                // Similar workaround needs to be applied to Africa/Cairo and
5aa09a
-                // its endDayOfWeek and endTime
5aa09a
-                // Below is the workarounds, it probably slows down everyone a little
5aa09a
-                if (params[2] == 6 && params[3] == 0 &&
5aa09a
-                    (zoneId.equals("Asia/Amman"))) {
5aa09a
-                    params[2] = 5;
5aa09a
-                    params[3] = 86400000;
5aa09a
-                }
5aa09a
-                // Additional check for startDayOfWeek=6 and starTime=86400000
5aa09a
-                // is needed for Asia/Amman;
5aa09a
-                if (params[2] == 7 && params[3] == 0 &&
5aa09a
-                     (zoneId.equals("Asia/Amman"))) {
5aa09a
-                    params[2] = 6;        // Friday
5aa09a
-                    params[3] = 86400000; // 24h
5aa09a
-                }
5aa09a
-                //endDayOfWeek and endTime workaround
5aa09a
-                if (params[7] == 6 && params[8] == 0 &&
5aa09a
-                    (zoneId.equals("Africa/Cairo"))) {
5aa09a
-                    params[7] = 5;
5aa09a
-                    params[8] = 86400000;
5aa09a
-                }
5aa09a
-
5aa09a
             } else if (nTrans > 0) {  // only do this if there is something in table already
5aa09a
                 if (lastyear < LASTYEAR) {
5aa09a
                     // ZoneInfo has an ending entry for 2037
5aa09a
@@ -908,7 +880,6 @@ public final class ZoneInfoFile {
5aa09a
             this.dow = dowByte == 0 ? -1 : dowByte;
5aa09a
             this.secondOfDay = timeByte == 31 ? in.readInt() : timeByte * 3600;
5aa09a
             this.timeDefinition = (data & (3 << 12)) >>> 12;
5aa09a
-
5aa09a
             this.standardOffset = stdByte == 255 ? in.readInt() : (stdByte - 128) * 900;
5aa09a
             this.offsetBefore = beforeByte == 3 ? in.readInt() : standardOffset + beforeByte * 1800;
5aa09a
             this.offsetAfter = afterByte == 3 ? in.readInt() : standardOffset + afterByte * 1800;