<i18n dev> RFR: 8369452: Locale.Builder.setLanguageTag(String) does not clear on empty or null String [v2]
Naoto Sato
naoto at openjdk.org
Fri Oct 10 16:13:05 UTC 2025
On Thu, 9 Oct 2025 23:42:39 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> Please review this PR which corrects the behavior of `Locale.Builder.setLanguageTag(String)` on the null and empty String case.
>>
>> This method is specified as follows,
>>
>>> Null and the empty string cause the builder to be reset
>>
>> Currently, NPE is thrown for a null tag, and ILE is thrown for an empty String. They are both corrected to not throw, and instead reset the state of the `Locale.Builder`.
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>
> Naoto's comment - improve err msg
Marked as reviewed by naoto (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27734#pullrequestreview-3324546666
More information about the i18n-dev
mailing list