IsoFields.WEEK_BASED_YEAR adjustInto incorrect

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b11

        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.

          1. FixIsoFieldsWeekBasedYear.patch
            14 kB
            Stephen Colebourne
          2. FixWeekFieldsWOWBYRange.patch
            2 kB
            Stephen Colebourne

              Assignee:
              Roger Riggs
              Reporter:
              Stephen Colebourne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: