On Tue, 29 Jul 2025 21:09:59 GMT, Chen Liang <[email protected]> wrote:

> In #24773, people were concerned that the layout of a UTF16 byte array and a 
> char array may be incompatible. In fact, they are - they are asserted in a 
> corner in `LibraryCallKit::inline_string_char_access` in `library_call.cpp`.
> 
> In addition, another frequent error I see is that contributors have confused 
> the meaning of indices in StringUTF16 - the indices are always in char array 
> indices. I think we should make these explicit to help future maintenance.

This pull request has now been integrated.

Changeset: fe09e93b
Author:    Chen Liang <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/fe09e93b8fc3081c944f3824fdaa55cc17e377a8
Stats:     12 lines in 1 file changed: 12 ins; 0 del; 0 mod

8364317: Explicitly document some assumptions of StringUTF16

Reviewed-by: rgiulietti, rriggs, vyazici

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

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

Reply via email to