RFR: 8338257: UTF8 lengths should be size_t not int [v5]
David Holmes
dholmes at openjdk.org
Wed Aug 28 04:43:21 UTC 2024
On Wed, 28 Aug 2024 03:46:43 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Note that I do already document the assumptions here in the general comment in utf8.hpp:
>>
>> There is an additional assumption/expectation that our UTF8 API's are never dealing with
>> invalid UTF8, and more generally that all UTF8 sequences could form valid Strings.
>> Consequently the Unicode length of a UTF8 sequence is assumed to always be representable
>> by an int.
>>
>> the check_cast is then the assert that verifies that.
>
> OK, that's good enough for me. Thanks,
Thanks for the review @dean-long !
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20560#discussion_r1733973531
More information about the serviceability-dev
mailing list