[jdk9] RFR: 8164366: ZoneOffset.ofHoursMinutesSeconds() does not reject invalid input

Ivan Gerasimov ivan.gerasimov at oracle.com
Fri Aug 19 14:59:54 UTC 2016

On 19.08.2016 17:32, Stephen Colebourne wrote:
> I'm less comfortable with the compareTo change because it may make it
> slower and that may have knock on effects. I think a comment saying
> that both are bounded would be enough in compareTo()

Okay.  I reverted that change back then and added a comment.
The webrev is updated:

With kind regards,

> Stephen
> On 19 August 2016 at 13:52, Ivan Gerasimov <ivan.gerasimov at oracle.com> wrote:
>> Thanks Nadeesh.  It's a good catch!
>> Here's the updated webrev:
>> http://cr.openjdk.java.net/~igerasim/8164366/01/webrev/
>> I also slightly modified comareTo(), not because there was an error in it,
>> but just to avoid thinking too much about possible overflow in subtraction
>> (of course, there can be no overflow here, as totalSeconds is bounded.)
>> Now we just need official blessing from the Reviewer.
>> With kind regards,
>> Ivan
>> On 19.08.2016 9:01, nadeesh tv wrote:
>>> Hi Ivan,
>>> ZoneOffset.ofTotalSeconds(Integer.MIN_VALUE) have also the same issue. It'
>>> not throwing the expected DTE.
>>> May be you can correct this also as part of this.
>>> Please update the copyright year also.
>>> Rest looks good.

More information about the core-libs-dev mailing list