src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
changeset 55634 0f1e29c77e50
parent 50817 fa1e04811ff6
child 57667 79036e5e744b
--- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java	Tue Jul 09 16:37:30 2019 -0700
+++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java	Wed Jul 10 05:12:23 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -573,8 +573,12 @@
                     // we can then pass in the dom = -1, dow > 0 into ZoneInfo
                     //
                     // hacking, assume the >=24 is the result of ZRB optimization for
-                    // "last", it works for now.
-                    if (dom < 0 || dom >= 24) {
+                    // "last", it works for now. From tzdata2019a this hacking
+                    // will not work for Asia/Gaza and Asia/Hebron which follow
+                    // Palestine DST rules.
+                    if (dom < 0 || dom >= 24 &&
+                                   !(zoneId.equals("Asia/Gaza") ||
+                                     zoneId.equals("Asia/Hebron"))) {
                         params[1] = -1;
                         params[2] = toCalendarDOW[dow];
                     } else {