RFR: 8174831: Reduce number of Charset classes loaded on bootstrap

Alan Bateman Alan.Bateman at oracle.com
Mon Feb 13 19:12:33 UTC 2017

On 13/02/2017 19:03, Claes Redestad wrote:

> Hi,
> this patch addresses a few tiny startup regressions incurred mostly by
> the fact that Compact Strings eagerly loads more Charsets early.
> java.nio.charset.StandardCharsets is dropped from the early bootstrap,
> load fastpaths are added for the 3 eagerly used Charsets (which avoids
> some early reflection use), plus a couple of other nits:
> Webrev: http://cr.openjdk.java.net/~redestad/8174831/webrev.01/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8174831
> Testing: jdk-tier1 tests
One suggestion is to comment the `==` check in Charset.lookup as future 
maintainers may wonder why it doesn't use equals.


More information about the core-libs-dev mailing list