maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SCM-878) .AbstractConsumer#parseDate() logs wrong locale in case of a ParseException
Date Sun, 01 Apr 2018 21:33:00 GMT

     [ https://issues.apache.org/jira/browse/SCM-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Osipov updated SCM-878:
-------------------------------
    Summary: .AbstractConsumer#parseDate() logs wrong locale in case of a ParseException 
(was: .AbstractConsumer#parseDate() logs wrong locale in case of ParseException)

> .AbstractConsumer#parseDate() logs wrong locale in case of a ParseException
> ---------------------------------------------------------------------------
>
>                 Key: SCM-878
>                 URL: https://issues.apache.org/jira/browse/SCM-878
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-api
>    Affects Versions: 1.9.5
>         Environment: 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"
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 1.9.6
>
>
> While testing SCM with JDK 10 the Jazz provider fails with:
> {noformat}
> 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){noformat}
> Looking th 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()}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message