<i18n dev> RFR: 5061061: SimpleDateFormat: unspecified behavior for reserved pattern letter

Naoto Sato naoto at openjdk.org
Mon Mar 24 23:04:07 UTC 2025


On Mon, 24 Mar 2025 21:21:20 GMT, Justin Lu <jlu at openjdk.org> wrote:

> Please review this specification update for `SimpleDateFormat` which explicitly specifies the behavior for 'reserved' pattern letters. This is a specification update and has the potential low risk of making an implementation non-compliant. Thus, an associated CSR is filed.

Looks good

src/java.base/share/classes/java/text/SimpleDateFormat.java line 95:

> 93:  * {@code 'A'} to {@code 'Z'} and from {@code 'a'} to
> 94:  * {@code 'z'} not in the table below are reserved). Using unquoted reserved
> 95:  * characters in a pattern throws {@code IllegalArgumentException}.

`Using` part could be more specific, ie, in the constructors or `applyPattern()`

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

PR Review: https://git.openjdk.org/jdk/pull/24207#pullrequestreview-2711860724
PR Review Comment: https://git.openjdk.org/jdk/pull/24207#discussion_r2011035210


More information about the i18n-dev mailing list