8245407: Enhance zoning of times

Reviewed-by: rriggs, rhalade, skoivu
This commit is contained in:
Naoto Sato 2020-06-02 08:48:00 -07:00 committed by Henry Jen
parent fc5fca9ade
commit d149dcdbd5

@ -2728,7 +2728,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
lenient == that.lenient &&
firstDayOfWeek == that.firstDayOfWeek &&
minimalDaysInFirstWeek == that.minimalDaysInFirstWeek &&
zone.equals(that.zone);
(zone instanceof ZoneInfo ?
zone.equals(that.zone) :
zone.equals(that.getTimeZone()));
} catch (Exception e) {
// Note: GregorianCalendar.computeTime throws
// IllegalArgumentException if the ERA value is invalid