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

Changed date format from previous version

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      FULL PRODUCT VERSION :
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+109-2016-03-09-204013.javare.4620.nc)



      ADDITIONAL OS VERSION INFORMATION :
      Generic

      A DESCRIPTION OF THE PROBLEM :
      Date parsing using the default formatter fails where it previously succeeded

      REGRESSION. Last worked in version 8u74

      ADDITIONAL REGRESSION INFORMATION:
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+109-2016-03-09-204013.javare.4620.nc)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the provided code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The code should exit normally
      ACTUAL -
      There is an exception

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "main" java.text.ParseException: Unparseable date: "3/11/16 10:59:00 PM"
              at java.text.DateFormat.parse(DateFormat.java:366)
              at Test2.main(Test2.java:8)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.text.DateFormat;
      import java.util.Locale;

      public class Test {
          public static void main(String[] args) throws Throwable {
              DateFormat.getDateTimeInstance(DateFormat.SHORT,
                      DateFormat.MEDIUM,
                      Locale.US).parse("3/11/16 10:59:00 PM");
          }
      }

      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              okutsu Masayoshi Okutsu
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: