<i18n dev> RFR: 8364780: Ambiguity in DecimalFormatSymbols Unicode extension priority

Naoto Sato naoto at openjdk.org
Thu Aug 7 22:33:11 UTC 2025


On Thu, 7 Aug 2025 21:47:26 GMT, Justin Lu <jlu at openjdk.org> wrote:

> This PR clarifies the Unicode extension wording in the DecimalFormatSymbols class description to make apparent that the "nu" extension is supported in addition to the "rg" extension. There already exists "nu" commentary in the specification of the  Locale accepting method APIs, the main purpose of this change is to clarify the behavior when both extensions are supplied.
> 
> Note that "may" wording is intentionally used, as symbols are only overridden if the JRE implementation provides support.

Thanks for cleaning this. This is definitely a leftover from [JDK-8186697](https://bugs.openjdk.org/browse/JDK-8186697). I think "cu" needs to have the same wording?

src/java.base/share/classes/java/text/DecimalFormatSymbols.java line 62:

> 60:  * your {@code DecimalFormat} and modify it.
> 61:  *
> 62:  * <p> The "rg" (region override) and "nu" (numbering system) {@code Locale}

Nit: extra space before "The"

src/java.base/share/classes/java/text/DecimalFormatSymbols.java line 93:

> 91:      */
> 92:     public DecimalFormatSymbols() {
> 93:         initialize(Locale.getDefault(Locale.Category.FORMAT));

Taking this opportunity, remove the surrounding spaces in the method itself: (L:817)

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

PR Review: https://git.openjdk.org/jdk/pull/26683#pullrequestreview-3098950525
PR Review Comment: https://git.openjdk.org/jdk/pull/26683#discussion_r2261559787
PR Review Comment: https://git.openjdk.org/jdk/pull/26683#discussion_r2261577832


More information about the i18n-dev mailing list