Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 58a515e

Browse files
committed
8245407: Enhance zoning of times
Reviewed-by: rriggs, rhalade, skoivu
1 parent 799e02c commit 58a515e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/java.base/share/classes/java/util/Calendar.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2725,7 +2725,9 @@ public boolean equals(Object obj) {
27252725
lenient == that.lenient &&
27262726
firstDayOfWeek == that.firstDayOfWeek &&
27272727
minimalDaysInFirstWeek == that.minimalDaysInFirstWeek &&
2728-
zone.equals(that.zone);
2728+
(zone instanceof ZoneInfo ?
2729+
zone.equals(that.zone) :
2730+
zone.equals(that.getTimeZone()));
27292731
} catch (Exception e) {
27302732
// Note: GregorianCalendar.computeTime throws
27312733
// IllegalArgumentException if the ERA value is invalid

0 commit comments

Comments
 (0)