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

IsoFields.WEEK_BASED_YEAR adjustInto incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 8
    • core-libs
    • None
    • b11

    Backports

      Description

        The implementation of IsoFields.WEEK_BASED_YEAR is completely invalid. As a result, addition using WEEK_BASED_YEARS is broken.

        Given an input date 2012-W30-6 setting the week-based-year should only change the year and leave the week and day-of-week unaltered (except where week 53 becomes week 52). The current implementation does not achieve this.

        In addition, the current code does not reset back to the input temporal, which results in JDK-8038490.

        Sadly, this code managed to make it into the JDK with no tests, which also needs addressing.

        Attachments

          Issue Links

            Activity

              People

                rriggs Roger Riggs
                scolebourne Stephen Colebourne
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: