Re: [15] RFR: 8236903: ZoneRules#getOffset throws DateTimeException for rules with last rules
+1, looks good On 1/22/20 4:55 AM, Stephen Colebourne wrote: Looks good Stephen On Tue, 21 Jan 2020 at 21:53, wrote: Please review the fix to the following issue: https://bugs.openjdk.java.net/browse/JDK-8236903 The proposed changeset is located at: http://cr.openjdk.java.net/~naoto/8236903/webrev.00/ This edge case throws an out-of-bounds DateTimeException in ZoneRules.findYear() on calculating the year. Instead of relying on LocalDate.ofEpochDay(), inlining the year caluculation from that method, and cap to the MAX value if needed, will solve the issue. Naoto
Re: [15] RFR: 8236903: ZoneRules#getOffset throws DateTimeException for rules with last rules
Looks good Stephen On Tue, 21 Jan 2020 at 21:53, wrote: > Please review the fix to the following issue: > > https://bugs.openjdk.java.net/browse/JDK-8236903 > > The proposed changeset is located at: > > http://cr.openjdk.java.net/~naoto/8236903/webrev.00/ > > This edge case throws an out-of-bounds DateTimeException in > ZoneRules.findYear() on calculating the year. Instead of relying on > LocalDate.ofEpochDay(), inlining the year caluculation from that method, > and cap to the MAX value if needed, will solve the issue. > > Naoto