Skip to content

Commit d149dcd

Browse files
naotojslowhog
authored andcommitted
8245407: Enhance zoning of times
Reviewed-by: rriggs, rhalade, skoivu
1 parent fc5fca9 commit d149dcd

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
@@ -2728,7 +2728,9 @@ public boolean equals(Object obj) {
27282728
lenient == that.lenient &&
27292729
firstDayOfWeek == that.firstDayOfWeek &&
27302730
minimalDaysInFirstWeek == that.minimalDaysInFirstWeek &&
2731-
zone.equals(that.zone);
2731+
(zone instanceof ZoneInfo ?
2732+
zone.equals(that.zone) :
2733+
zone.equals(that.getTimeZone()));
27322734
} catch (Exception e) {
27332735
// Note: GregorianCalendar.computeTime throws
27342736
// IllegalArgumentException if the ERA value is invalid

0 commit comments

Comments
 (0)