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

ZoneOffset.ofHoursMinutesSeconds() does not reject invalid input

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b134

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: