RFR: 8338257: UTF8 lengths should be size_t not int [v5]
    David Holmes 
    dholmes at openjdk.org
       
    Tue Aug 27 07:26:05 UTC 2024
    
    
  
On Tue, 27 Aug 2024 03:36:00 GMT, Dean Long <dlong at openjdk.org> wrote:
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   more missing casts
>
> src/hotspot/share/classfile/javaClasses.cpp line 633:
> 
>> 631: }
>> 632: 
>> 633: int java_lang_String::utf8_length_as_int(oop java_string, typeArrayOop value) {
> 
> Why not call java_lang_String::utf8_length() here instead of duplicating the code?
Because we have to call `UNICODE::utf8_length_as_int` to get the proper truncation - the code is not an exact duplicate.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20560#discussion_r1732284976
    
    
More information about the hotspot-dev
mailing list