RFR [10]: 8186517: sun.nio.cs.StandardCharsets$Aliases and ClassMap can be lazily loaded

Peter Levart peter.levart at gmail.com
Thu Aug 24 10:24:27 UTC 2017

Hi Claes,

On 08/24/2017 12:13 AM, Claes Redestad wrote:
>>> This allows us to lazily load the $Cache class too, further reducing
>>> work done during System.initPhase1:
>>> http://cr.openjdk.java.net/~redestad/8186517/jdk.02/
> /Claes

According to 2nd webrev, StandardCharsets.charsetForName("UTF-8") 
returns a different instance than 
StandardCharsets.charsetForName("utf-8"). Perhaps the argument of 
lookup() should 1st be passed through canonicalize(toLower(charsetName)) 
and then used in the 3 special-case ifs..

Regards, Peter

More information about the nio-dev mailing list