<i18n dev> RFR: 8351074: Disallow null prefix and suffix in DecimalFormat [v2]
Naoto Sato
naoto at openjdk.org
Tue Mar 4 17:56:06 UTC 2025
On Tue, 4 Mar 2025 01:47:40 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> Please review this PR and associated CSR which disallows passing null to 4 `DecimalFormat` prefix/suffix setter methods.
>>
>> Currently these setters do not check the input String for null. When the prefix/suffix is null, any such DecimalFormat instances are effectively non-functional as it will throw NPE for most operations.
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>
> correct bug ID for test
src/java.base/share/classes/java/text/DecimalFormat.java line 2815:
> 2813: * <P>Examples: +123, $123, sFr123
> 2814: *
> 2815: * @param newValue the new positive prefix
Although it may be apparent with the `@throws` tag, `@param` can also mention the new value is non-null.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23880#discussion_r1979942411
More information about the i18n-dev
mailing list