RFR: 8361842: Move input validation checks to Java for java.lang.StringCoding intrinsics [v8]

Volkan Yazici vyazici at openjdk.org
Tue Aug 12 08:17:59 UTC 2025


On Thu, 17 Jul 2025 13:58:32 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace casting with `as_Region()` in `generate_string_range_check`
>
> src/java.base/share/classes/java/lang/StringCoding.java line 130:
> 
>> 128:      * <p>
>> 129:      * This method assumes that {@code sa} is encoded in UTF-16, and hence,
>> 130:      * each {@code char} maps to 2 bytes.
> 
> Since `sa` is assumed to be encoded in UTF-16, what's the point of the previous paragraph?

@rgiulietti, gave it some more thought, and I think you're right, this is probably just noise. Removed in d5aabf0c62a.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25998#discussion_r2269064538


More information about the hotspot-dev mailing list