On Fri, 14 Aug 2026 13:50:23 GMT, Liam Miller-Cushon <[email protected]> wrote:
>> There is on going effort to make direct access more auditable, and naming is >> critical. The naming and warning in uncheckedGetBytesOrThrow was part of >> that effort. We have to be very careful. So I think the high level comment >> is to explore all other directions/options before proposing another back >> door into string internals. > > Understood, thanks! > > I went ahead and updated this to use a read-only `MemorySegment` instead of > exposing the `values` array, which still wouldn't be safe for a public API > like I mentioned but is less dangerous for internal use. None of the naming > or documentation here is intended to be a final proposal, just a prototype > for discussion of the potential Vector APIs. I have revised this again to use `VectorSupport` to keep the `String` values array encapsulated and avoid the `MemorySegment` accessor (see the `StringVectorSupport` helper). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32373#discussion_r4652447759
