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

DateTimeFormatter spec includes irrelevant detail on parsing pattern

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      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.

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/dc0edff71f1c
            User: rriggs
            Date: 2014-02-05 16:03:33 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/dc0edff71f1c User: rriggs Date: 2014-02-05 16:03:33 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/dc0edff71f1c
            User: lana
            Date: 2014-02-11 21:05:42 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/dc0edff71f1c User: lana Date: 2014-02-11 21:05:42 +0000

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: