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.

          Activity

          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/8e5362b5a18d
          User: igerasim
          Date: 2016-08-22 19:17:47 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/8e5362b5a18d User: igerasim Date: 2016-08-22 19:17:47 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/8e5362b5a18d
          User: lana
          Date: 2016-08-31 20:17:52 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/8e5362b5a18d User: lana Date: 2016-08-31 20:17:52 +0000

            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: