[jdk9] RFR: 8164366: ZoneOffset.ofHoursMinutesSeconds() does not reject invalid input
Stephen Colebourne
scolebourne at joda.org
Fri Aug 19 14:32:48 UTC 2016
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()
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