RFR: 8366401: JCK test api/java_text/DecimalFormatSymbols/serial/InputTests.html fails after JDK-8363972 [v3]

Justin Lu jlu at openjdk.org
Tue Sep 2 21:02:46 UTC 2025


> This PR addresses a JCK test failure related to `DecimalFormatSymbols` de-serialization. While the current public API of DFS disallows a null locale, it was possible to set in the past. Thus, the `loadNumberData(locale)` call currently throws NPE when locale is null in the stream. The call should be guarded with a null check, such that if locale is null, then `lenientMinusSigns` defaults to `minusSignText`.
> 
> Defaulting the locale field when `null` to Locale.ROOT is also a reasonable solution, but I think that the current one is preferable as a user would not expect locale data related logic to occur if locale is `null`.

Justin Lu has updated the pull request incrementally with one additional commit since the last revision:

  Clarify the null locale comment

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27008/files
  - new: https://git.openjdk.org/jdk/pull/27008/files/751d00be..445bbe85

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27008&range=01-02

  Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/27008.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27008/head:pull/27008

PR: https://git.openjdk.org/jdk/pull/27008


More information about the core-libs-dev mailing list