RFR: 8305746: InitializeEncoding should cache Charset object instead of charset name [v3]
Peter Hofer
phofer at openjdk.org
Wed Apr 19 07:19:44 UTC 2023
On Wed, 19 Apr 2023 07:08:53 GMT, Peter Hofer <phofer at openjdk.org> wrote:
>> Store `Charset` object in `jnuEncoding` and use `String(byte[], Charset)` and `String.getBytes(Charset)` instead of passing the charset name.
>
> Peter Hofer has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge remote-tracking branch 'origin/master' into JDK-8305746
> - Rename jnuEncoding to jnuCharset.
> - 8305746: InitializeEncoding should cache Charset object instead of charset name
I have a test in GraalVM which passes with this change in place and will periodically run and start failing in case of a regression. Other issues with this code should become obvious quickly because the code paths are exercised even for non-7bit UTF-8 strings.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13499#issuecomment-1514244592
More information about the core-libs-dev
mailing list