RFR: 8299807: String.newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

Sergey Tsypanov stsypanov at openjdk.org
Tue Jan 17 07:28:09 UTC 2023


On Mon, 9 Jan 2023 03:34:55 GMT, Glavo <duke at openjdk.org> wrote:

> `JavaLangAccess::newStringUTF8NoRepl` and `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They always copy arrays, rather than avoiding copying as much as possible as javadoc says.
> 
> I ran the tier1 test without any new errors.

I see that `getBytesUTF8NoRepl()` is used in `j.u.z.ZipCoder`, so could you run tests for zip encoding just to make sure everything is fine there? And I think that tier2 should be run for this as well.

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

PR: https://git.openjdk.org/jdk/pull/11897


More information about the core-libs-dev mailing list