RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

Jaikiran Pai jpai at openjdk.org
Wed May 7 08:05:14 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

Hello Volkan, I checked with others on how to make it prominent, when reading code and when reviewing changes to code, that the usage of these methods needs extra careful attention.

In addition to updating the javadoc of these methods, we came to an agreement that each of these methods should be updated to have `unchecked` as the prefix in their method names. For example,  renaming `countPositives(...)` to `uncheckedCountPositives(...)`. Even though it means a few additional characters to the method names, this should help catch attention wherever these methods get used.

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

PR Comment: https://git.openjdk.org/jdk/pull/24982#issuecomment-2857500353


More information about the security-dev mailing list