RFR: 8374210: [BACKOUT] Move input validation checks to Java for java.lang.StringCoding intrinsics
Aleksey Shipilev
shade at openjdk.org
Tue Jan 6 10:55:38 UTC 2026
On Tue, 6 Jan 2026 09:57:02 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 455:
>>
>>> 453: * compatible.
>>> 454: * <p>
>>> 455: * <b>WARNING: This method does not perform any bound checks.</b>
>>
>> These two lines are not in the original commit?
>>
>> https://github.com/openjdk/jdk/commit/655dc516c22ac84fccee6b1fdc607c492465be6b#diff-bd92d760986b9249dd3c02cc147db4f7e9dbbef90afef4971ee497a50e48c740
>
> In chronological order:
>
> 1. 8fcfddb2d202 renamed `encodeASCII` to `uncheckedEncodeASCII` and added the `WARNING` clause.
> 2. 655dc516c22a, the commit this PR is reverting, renamed the method back to `encodeASCII` and removed the `WARNING`. This was possible, since `StringCoding::implEncodeAsciiArray` was hardened with necessary checks in the very same commit.
Ah yes, I misread, apologies.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29055#discussion_r2664514651
More information about the core-libs-dev
mailing list