On Tue, 6 May 2025 08:44:56 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> @ForceInline
>>     static int checkOverflow(int value) {
>>         if (value >= 0) {
>>             return value;
>>         }
>>         throw new OutOfMemoryError("Overflow: String length out of range");
>>     }
>> 
>>     private static long checkOverflow(long lengthCoder) {
>>         if ((int)lengthCoder >= 0) {
>>             return lengthCoder;
>>         }
>>         throw new OutOfMemoryError("Overflow: String length out of range");
>>     }
>> 
>> @cl4es There are two checkOverflow methods
>
> Exactly. The one used here is the (int) variant.

D'oh, missed that it's been added since it's not co-located in the source. 
Sorry for the noise!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25038#discussion_r2075147358

Reply via email to