JDK-8164366 : ZoneOffset.ofHoursMinutesSeconds() does not reject invalid input
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-08-18
  • Updated: 2017-11-29
  • Resolved: 2016-08-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u152Fixed 9 b134Fixed
Description
To validate ranges for minutes and seconds the following code is used:

        if (Math.abs(minutes) > 59) {
...
        if (Math.abs(seconds) > 59) {
...

which fails when the argument is Integer.MIN_VALUE.