RFR: 8259842: Remove Result cache from StringCoding [v4]
Claes Redestad
redestad at openjdk.java.net
Sat Jan 16 02:08:30 UTC 2021
On Sat, 16 Jan 2021 00:25:24 GMT, Peter Levart <plevart at 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
More information about the core-libs-dev
mailing list