RFR: 8330276: Console methods with explicit Locale [v2]
Naoto Sato
naoto at openjdk.org
Wed May 1 17:42:58 UTC 2024
On Wed, 1 May 2024 17:10:53 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Addressed review comments
>
> src/java.base/share/classes/java/io/ProxyingConsole.java line 89:
>
>> 87: @Override
>> 88: public Console format(String format, Object ... args) {
>> 89: return format(Locale.getDefault(Locale.Category.FORMAT), format, args);
>
> Given the number of calls to Locale.getDefault(Locale.Category.FORMAT) it might be worthwhile to cache that in the Proxying Console or in the JdkConsoleImpl.
Initially, I thought about it but did not cache it here because it is cached in the `Locale` class, and the call returns the cached value.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18923#discussion_r1586554554
More information about the core-libs-dev
mailing list