JDK-8136539 : SimpleDateFormat won't parse German "Mrz" for March
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 8u60
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: linux
  • CPU: x86
  • Submitted: 2015-09-11
  • Updated: 2015-09-15
  • Resolved: 2015-09-11
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux mle 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
The String "01 Mrz 2015" cannot be parsed as German Date anymore:

new SimpleDateFormat("dd MMM yyyy", Locale.GERMAN).parse("01 Mrz 2015");

The issue is only related to the Month March.

REGRESSION.  Last worked in version 8u51

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
The following code will throw a "java.text.ParseException"

new SimpleDateFormat("dd MMM yyyy", Locale.GERMAN).parse("01 Mrz 2015");

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The String should parse into a date.
ACTUAL -
java.text.ParseException: Unparseable date: "01 Mrz 2015"
	at java.text.DateFormat.parse(DateFormat.java:366)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Unparseable date: "01 Mrz 2015"

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Locale;


public class SimpleDateFormatTest {

    public static void main(String... args) throws Exception {
        new SimpleDateFormat("dd MMM yyyy", Locale.GERMAN).parse("01 Mrz 2015");
    }

}

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


Comments
German month name for "March" has been changed with JDK-8075173. So this behavior is expected.
11-09-2015