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

DateTimeFormatter won't parse dates with custom format "yyyyMMddHHmmssSSS"

    Details

    • Subcomponent:
    • Resolved In Build:
      b116
    • OS:
      windows_8

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b120)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b62, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Windows 8.1

      A DESCRIPTION OF THE PROBLEM :
      Java 8 produces

      java.time.format.DateTimeParseException: Text '20130812214600025' could not be parsed at index 0

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run this with java 8

      String x = "20130812214600025";
      DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
      LocalDateTime t1 = LocalDateTime.parse(x, dtf);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      parsed successfully
      ACTUAL -
      Exception in thread "main" java.time.format.DateTimeParseException: Text '20130812214600025' could not be parsed at index 0
      at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1948)
      at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1850)
      at java.time.LocalDateTime.parse(LocalDateTime.java:484)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      String x = "20130812214600025";
      DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
      LocalDateTime t1 = LocalDateTime.parse(x, dtf);
      ---------- END SOURCE ----------

        Issue Links

          Activity

          webbuggrp Webbug Group created issue -
          alanb Alan Bateman made changes -
          Field Original Value New Value
          Project Java Incidents [ 10301 ] JDK [ 10100 ]
          Key JI-9009144 JDK-8031085
          Workflow JBS Incident Workflow [ 4709540 ] JBS Workflow [ 4709941 ]
          Affects Version/s 8 [ 11815 ]
          Affects Version/s 8 [ 15409 ]
          Component/s core-libs [ 10300 ]
          Component/s core-libs [ 10701 ]
          alanb Alan Bateman made changes -
          Subcomponent java.util [ 505 ] java.util [ 216 ]
          alanb Alan Bateman made changes -
          Subcomponent java.util [ 216 ] java.time [ 697 ]
          bpb Brian Burkhalter made changes -
          Attachment JDK8031085.java [ 18199 ]
          bpb Brian Burkhalter made changes -
          Assignee Xueming Shen [ sherman ]
          bpb Brian Burkhalter made changes -
          Status New [ 10000 ] Open [ 1 ]
          rriggs Roger Riggs made changes -
          Assignee Xueming Shen [ sherman ] Roger Riggs [ rriggs ]
          rriggs Roger Riggs made changes -
          Fix Version/s tbd_minor [ 11999 ]
          rriggs Roger Riggs made changes -
          Fix Version/s tbd_minor [ 11999 ]
          rriggs Roger Riggs made changes -
          Labels webbug 8-defer-request webbug
          maxelsso Mathias Axelsson (Inactive) made changes -
          Labels 8-defer-request webbug 8-defer-approved webbug
          Fix Version/s 9 [ 14949 ]
          mr Mark Reinhold made changes -
          Summary DateTimeFormatter won't parse dates DateTimeFormatter won't parse dates with custom format "yyyyMMddHHmmssSSS"
          rriggs Roger Riggs made changes -
          Link This issue is duplicated by JDK-8032052 [ JDK-8032052 ]
          scolebourne Stephen Colebourne made changes -
          Link This issue relates to JDK-8032491 [ JDK-8032491 ]
          scolebourne Stephen Colebourne made changes -
          Link This issue relates to JDK-8032494 [ JDK-8032494 ]
          rriggs Roger Riggs made changes -
          Link This issue duplicates JDK-8038486 [ JDK-8038486 ]
          rriggs Roger Riggs made changes -
          Link This issue duplicates JDK-8138676 [ JDK-8138676 ]
          rriggs Roger Riggs made changes -
          Link This issue duplicates JDK-8138676 [ JDK-8138676 ]
          ntv Nadeesh Tv (Inactive) made changes -
          Assignee Roger Riggs [ rriggs ] Nadeesh Tv [ ntv ]
          ntv Nadeesh Tv (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Understanding Fix Understood [ 10001 ]
          hgupdate HG Updates made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolved In Build team [ 17324 ]
          Understanding Fix Understood [ 10001 ]
          Resolution Fixed [ 1 ]
          hgupdate HG Updates made changes -
          Resolved In Build team [ 17324 ] master [ 18256 ]
          hgupdate HG Updates made changes -
          Resolved In Build master [ 18256 ] b116 [ 17844 ]
          iris Iris Clark made changes -
          Labels 8-defer-approved webbug 8-defer-approved jsr379-annex2-tbd webbug
          iris Iris Clark made changes -
          Labels 8-defer-approved jsr379-annex2-tbd webbug 8-defer-approved jsr379-annex1 webbug

            People

            • Assignee:
              ntv Nadeesh Tv (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: