On Mon, 6 Apr 2026 23:22:33 GMT, Justin Lu <[email protected]> wrote:

>> This PR includes two changes. First, `Locale.getDisplayScript(Locale)` 
>> incorrectly copies the return description of its sibling method 
>> `Locale.getDisplayScript()`. It is corrected to describe the actual 
>> contract. 
>> 
>> Second, the `getDisplayXXX` methods are updated to better distinguish the 
>> `Locale` from which the methods are invoked on versus the `Locale` which is 
>> used for localization of the output. An example of this issue is the 
>> following,
>> 
>> `Locale.getDisplayCountry()` states it returns "The name of the country 
>> appropriate to the locale."
>> `Locale.String getDisplayCountry(Locale inLocale)` states it returns "The 
>> name of the country appropriate to the given locale."
>> 
>> In the no-arg method, "locale" is ambiguous and may refer to `this` or the 
>> default display locale, while in the 1-arg method, "locale" is `inLocale`. 
>> It would be more clear if the methods consistently referred to the same 
>> "locale". i.e., either the one doing the localizing, or the one from which 
>> the methods are invoked on.
>
> Justin Lu has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Also clarify 'the locale' in top of method description by referring to 
> 'this locale'

Marked as reviewed by naoto (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/30590#pullrequestreview-4069712986

Reply via email to