On Mon, 16 Mar 2026 11:44:09 GMT, Volkan Yazici <[email protected]> wrote:

>> Improve input validation checks and documentation of the 
>> `java.lang.StringUTF16` intrinsics.
>> 
>> ### References:
>> 
>> - [JDK-8374582] #29164 — ditto for `java.lang.StringCoding`
>> - [JDK-8367129] #28832 — ditto for `java.lang.StringLatin1`
>> 
>> [JDK-8367129]: https://bugs.openjdk.org/browse/JDK-8367129
>> [JDK-8374582]: https://bugs.openjdk.org/browse/JDK-8374582
>
> Volkan Yazici has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove redundant deoptimization exits

Otherwise the Java code LGTM.

src/java.base/share/classes/java/lang/StringUTF16.java line 94:

> 92: 
> 93:     /**
> 94:      * Inserts the given code point to the specified position of the 
> provided

Is there maybe a better term than "inserts"? The latter suggests that all 
following characters are shifted to make room for the new one.

src/java.base/share/classes/java/lang/StringUTF16.java line 2043:

> 2041:     }
> 2042: 
> 2043:     static void checkBoundsBeginEnd(int begin, int end, byte[] val) {

Probably not part of this PR, but
Suggestion:

    private static void checkBoundsBeginEnd(int begin, int end, byte[] val) {

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

PR Review: https://git.openjdk.org/jdk/pull/30139#pullrequestreview-3954132301
PR Review Comment: https://git.openjdk.org/jdk/pull/30139#discussion_r2940621024
PR Review Comment: https://git.openjdk.org/jdk/pull/30139#discussion_r2940627822

Reply via email to