RFR 8234147 : Avoid looking up standard charsets in core libraries

Ivan Gerasimov ivan.gerasimov at oracle.com
Wed Nov 27 04:39:28 UTC 2019


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