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

SimpleDateFormat can not parse date anymore

XMLWordPrintable

    • x86_64
    • linux

      A DESCRIPTION OF THE PROBLEM :
      JDK16+25 cannot parse a simple date:

      See: https://travis-ci.org/github/graphhopper/graphhopper/jobs/744890249

      REGRESSION : Last worked in version 16

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no error
      ACTUAL -
      ParseException at java.base/java.text.DateFormat.parse(DateFormat.java:396)

      ---------- BEGIN SOURCE ----------
      DateFormat df = new SimpleDateFormat("yyyy MMM dd", Locale.UK);
      df.setTimeZone(TimeZone.getTimeZone("UTC"));
      df.parse("2015 Sep 30"); // => java.text.ParseException: Unparseable date: "2015 Sep 30"
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      This does not happen with JDK16+24: https://travis-ci.org/github/graphhopper/graphhopper/jobs/744725038

            naoto Naoto Sato
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: