Blame SOURCES/jdk8274864-remove_amman_cairo_hacks.patch

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