On Sat, 16 Jan 2021 00:25:24 GMT, Peter Levart <plev...@openjdk.org> wrote:

> Do you think this code belongs more to String than to StringCoding?

I consider StringCoding an implementation detail of String, so I'm not sure 
there's (much) value in maintaining the separation of concern if it is cause 
for a performance loss. While encapsulating and separating concerns is a fine 
purpose I think the main purpose served by StringCoding is to resolve some 
bootstrap issues: String is one of the first classes to be loaded and eagerly 
pulling in dependencies like ThreadLocal and Charsets before bootstrapping 
leads to all manner of hard to decipher issues (yes - I've tried :-)).

-------------

PR: https://git.openjdk.java.net/jdk/pull/2102

Reply via email to