[jdk19] RFR: 8289601: SegmentAllocator::allocateUtf8String(String str) should be clarified for strings containing \0
Jorn Vernee
jvernee at openjdk.org
Wed Jul 6 11:09:33 UTC 2022
On Mon, 4 Jul 2022 13:01:34 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> This PR updates the spec and implementation to throw an `IllegalArgumentException` when an attempt is made to convert a Java string containing null characters to a C string.
>
> Testing: local run of the `jdk_foreign` test suite.
I've tweaked the Javadoc. I realized it should also be tweaked for `MemorySegment::setUtf8String`.
-------------
PR: https://git.openjdk.org/jdk19/pull/107
More information about the core-libs-dev
mailing list