Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8164366

ZoneOffset.ofHoursMinutesSeconds() does not reject invalid input

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • b134

        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.

              igerasim Ivan Gerasimov
              igerasim Ivan Gerasimov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: