[
https://issues.apache.org/jira/browse/LANG-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17786836#comment-17786836
]
Konrad Windszus commented on LANG-1718:
---------------------------------------
Is an issue with the underlying CLDR release
(https://bugs.openjdk.org/browse/JDK-8304925). This is fixed in CLDR 43.1 or 44
(https://unicode-org.atlassian.net/browse/CLDR-16606,
https://cldr.unicode.org/index/downloads/cldr-44#h.7zr502lsxcv0)
{quote}
Some flexible date formats may use different spacing.
{quote}
Hopefully CLDR 44 is contained in the upcoming JDK 21.0.2 (scheduled for
2024-01-16)
> FastDateFormat.getTimeInstance(FastDateFormat.SHORT, Locale.US) uses
> incorrect separator on JDK21
> -------------------------------------------------------------------------------------------------
>
> Key: LANG-1718
> URL: https://issues.apache.org/jira/browse/LANG-1718
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.time.*
> Affects Versions: 3.13.0
> Reporter: Konrad Windszus
> Priority: Major
>
> The following code piece fails with a ParseException on JDK 21.0.1 but
> succeeds with JDK 17.0.7 (and earlier)
> {code}
> FastDateFormat dateFormat =
> FastDateFormat.getTimeInstance(FastDateFormat.SHORT, Locale.US);
> dateFormat2.parse("11:00 AM");
> {code}
> The reason for that is that the {{dateFormat.pattern}} with JDK21 is
> {code}
> [104, 0, 58, 0, 109, 0, 109, 0, 47, 32, 97, 0]
> {code}
> while with JDK 17 it is
> {code}
> [104, 58, 109, 109, 32, 97]
> {code}
> Notice the difference in the separator between the time and the am/pm!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)