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

JapaneseDate.get(DAY_OF_YEAR) values vs range are inconsistent

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      b102
    • Verification:
      Verified

      Description

      JapaneseDate.get(DAY_OF_YEAR) returns the number of days from the beginning of the Gregorian year, not the number of days from the beginning of the Era (for YearOfEra1).
      However, when fetching the DAY_OF_YEAR from a JapaneseDate for the start of an Era, an exception can be thrown because the dayOfYear is larger than the actualRange computed for that first year.

      BTW, there are no specific tests for JapaneseDate.get(DAY_OF_YEAR).

        Attachments

          Activity

            People

            • Assignee:
              rriggs Roger Riggs
              Reporter:
              rriggs Roger Riggs
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: