RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]
Alan Bateman
alanb at openjdk.org
Wed May 7 08:05:15 UTC 2025
On Wed, 7 May 2025 07:29:55 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Document preconditions on certain `JavaLangAccess` methods that use operations either unsafe and/or without range checks.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix typo in pre-existing JavaDoc
src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 355:
> 353: * UTF-16 representation.
> 354: * <p>
> 355: * <b>WARNING: This method does not perform any bound checks.</b>
Maybe not this PR but this method is begging to be renamed. It's really hard to audit usage when the method is accessible to faraway code via shared secrets. So maybe not this PR but I think we need an issue in JBS to track renaming, I think Stuart suggested prefixing with "unchecked".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24982#discussion_r2077039719
More information about the security-dev
mailing list