[jdk9] RFR: 8164366: ZoneOffset.ofHoursMinutesSeconds() does not reject invalid input
nadeesh.tv at oracle.com
Fri Aug 19 05:40:39 UTC 2016
Is not the the statement
"Zone offset minutes and seconds must be negative because hours is negative"
and the following doc definition contradicts ?
358 * @param minutes the time-zone offset in minutes, from 0 to ±59
359 * @param seconds the time-zone offset in seconds, from 0 to ±59
Thanks and Regards,
On 8/18/2016 11:46 PM, Stephen Colebourne wrote:
> Looks good
> On 18 August 2016 at 17:53, Ivan Gerasimov <ivan.gerasimov at oracle.com> wrote:
>> Hello everybody!
>> The factory methods of ZoneOffset class demonstrate a minor inconsistency.
>> Normally, invalid values of arguments are rejected (e.g. when minutes > 59),
>> but the value of Integer.MIN_VALUE is allowed to be passed in.
>> This is due to using Math.abs(), which cannot handle Integer.MIN_VALUE well.
>> Would you please help review the fix?
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8164366
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8164366/00/webrev/
>> With kind regards,
More information about the core-libs-dev