RFR: 8324665: Loose matching of space separators in the lenient date/time parsing mode

Joe Wang joehw at openjdk.org
Fri Feb 2 19:35:02 UTC 2024


On Thu, 1 Feb 2024 23:12:46 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> Implementing "loose matching" of space separators in both `java.time.format.DateTimeFormatter` and `java.text.DateFormat` on lenient parsing. This will effectively fix the NNBSP issues on parsing time with am/pm markers introduced with CLDR version 42 (https://inside.java/2023/03/28/quality-heads-up/). A draft CSR has also been drafted.

The compatibility risk is low for this change itself as assessed in the CSR, and this change looks good to me. However, just would like to note that it conforms to CLDR, but doesn't address completely the issue reported in JDK-8304925. Since the default parsing mode is strict in java.time.format, applications would still have to make code changes when moving existing code to the new JDK releases. In java.text then, all space separators will be parsed by default, that would be a welcoming behavior change to me.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17678#issuecomment-1924550866


More information about the core-libs-dev mailing list