On Tue, 21 Oct 2025 16:28:58 GMT, Justin Lu <[email protected]> wrote:

>> src/java.base/share/classes/java/util/Locale.java line 2736:
>> 
>>> 2734:          * are accepted but ignored. The same behavior applies to 
>>> duplicate locale
>>> 2735:          * keys and attributes within a U extension.
>>> 2736:          *
>> 
>> "Note that..." in the prior occurence of this wording might apply here for 
>> consistency.
>
> `Locale.forLanguageTag` is specified to _ignore subsequent subtags on 
> ill-formed input_, so a heads up is warranted. Since 
> `Lcoale.Builder.setLanguageTag` either throws or does not (and duplicate tags 
> do not throw), I think it is implied subsequent subtags are processed. 
> However, that's just my opinion, if you think it is not obvious, I will add 
> it in.

I think explicity specifying the note would not hurt here, otherwise missing 
"note" might unnecessarilly make readers wonder why

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27909#discussion_r2449159863

Reply via email to