<i18n dev> Integrated: 8369452: Locale.Builder.setLanguageTag(String) does not clear on empty or null String
Justin Lu
jlu at openjdk.org
Mon Oct 13 16:14:31 UTC 2025
On Thu, 9 Oct 2025 18:12:58 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`.
This pull request has now been integrated.
Changeset: 1d6cafdc
Author: Justin Lu <jlu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1d6cafdc5244960ddec2fd82b8454c6c3cafe022
Stats: 27 lines in 2 files changed: 22 ins; 0 del; 5 mod
8369452: Locale.Builder.setLanguageTag(String) does not clear on empty or null String
Reviewed-by: naoto
-------------
PR: https://git.openjdk.org/jdk/pull/27734
More information about the i18n-dev
mailing list