Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.9.5
-
None
-
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
Maven home: D:\Entwicklung\Programme\apache-maven-3.5.3\bin\..
Java version: 10, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-10
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00) Maven home: D:\Entwicklung\Programme\apache-maven-3.5.3\bin\.. Java version: 10, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk-10 Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Description
While testing SCM with JDK 10 the Jazz provider fails with:
skip ParseException: Unparseable date: "Feb 25, 2012 10:13 PM" during parsing date Feb 25, 2012 10:13 PM with pattern MMM d, yyyy h:mm a with Locale en java.text.ParseException: Unparseable date: "Feb 25, 2012 10:13 PM" at java.base/java.text.DateFormat.parse(DateFormat.java:395) at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:112) at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:68) at org.apache.maven.scm.provider.jazz.command.changelog.JazzListChangesetConsumer.processModifiedLine(JazzListChangesetConsumer.java:341) at org.apache.maven.scm.provider.jazz.command.changelog.JazzListChangesetConsumer.consumeLine(JazzListChangesetConsumer.java:249) at org.apache.maven.scm.provider.jazz.command.changelog.JazzChangeLogCommandTest.testListChangesetConsumer(JazzChangeLogCommandTest.java:159)ListChangesetConsumer.java:341)
Looking at the Jazz test code no locale is actually passed, so the default locale is used.
The issue is rooted in the catch warn statement (in org.apache.maven.scm.util.AbstractConsumer.parseDate(String, String, String, Locale)) which assumes that a passed null locale defaults to Locale.ENGLISH. It shall display Locale.getDefault().