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

DateTimeFormatter spec includes irrelevant detail on parsing pattern

    XMLWordPrintable

Details

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

    Backports

      Description

        The class-level Javadoc spec for DateTimeFormatter includes two sentences: "When parsing in strict mode, the number of parsed digits must match the count of pattern letters. When parsing in lenient mode, the number of parsed digits must be at least the count of pattern letters, up to 9 digits." These two sentences do not make sense in context as there is no way to control whether the pattern is strict or lenient from the DateTimeFormatter class.

        Retaining these in the spec could hamper changes in update releases as it implies control or behaviour that cannot be provided through this particular API method.

        The solution is to remove the two sentences.

        While making this change, line 463 of DateTimeFormatter contains a broken link to the resolve method in TemporalField which should also be fixed.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: