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

Clarify java.time.chrono.Chronology.isLeapYear for out of range years

    Details

    • Subcomponent:
    • Resolved In Build:
      b51
    • Verification:
      Verified

      Backports

        Description

        The spec says that the method isLeapYear(long prolepticYear) accepts as parameter prolepticYear which is not validated for range.

        http://docs.oracle.com/javase/8/docs/api/java/time/chrono/HijrahChronology.html#isLeapYear-long-

        But f.e. in the case of using one of the following values 1004, 1008, 1012, 2000, 400, 4, 400000000, 0, 96, -4, -400000000 as parameter the unexpected DateTimeException is thrown:

        java.time.DateTimeException: Hijrah date out of range


        Tests belonging to the JCK9 suite (not yet integrated) will fail due to this issue: api/java_time/chrono/HijrahChronology/index.html#IsLeapYear

        (not integrated yet)



          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rriggs Roger Riggs
                  Reporter:
                  ostrizhe Olga Strizhenko (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: