RFR 8234147 : Avoid looking up standard charsets in core libraries

Ivan Gerasimov ivan.gerasimov at oracle.com
Sun Dec 1 08:51:02 UTC 2019


Hi Ulf!

Thank you for the links!

The enhancement requests that you pointed out are about making the 
lookup faster.

My current proposal, however, is to completely avoid the lookup of the 
standard charsets in certain specific cases.

With kind regards,

Ivan

On 11/30/19 1:32 PM, Ulf Zibis wrote:
> Hi Ivan,
>
> you may compare your proposal with:
> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6790402
> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6850361
> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6796087
>
> -Ulf
>
> Am 27.11.19 um 05:39 schrieb Ivan Gerasimov:
>> Hello!
>>
>> It is a cleanup fix with mostly two kinds of changes:
>> - when a standard charset is specified by its name, use a 
>> preinitialized Charset constant instead,
>> - replace the usage of StandardCharset.* constants with their 
>> sun.nio.cs.* equivalents to avoid accidental early initialization of 
>> rarely-used charsets.
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8234147
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8234147/00/webrev/
>>
>> I also had to modify one regression test that relied on a private 
>> auxiliary method, which was removed with the fix.
>>
>> Mach5 control build looks green.
>>
>> Would you please help review the fix?
>>
-- 
With kind regards,
Ivan Gerasimov



More information about the core-libs-dev mailing list