On Wed, 7 May 2025 07:37:48 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> 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 302: > >> 300: * <b>WARNING: This method does not perform any bound checks.</b> >> 301: */ >> 302: int countPositives(byte[] ba, int off, int len); > > Maybe we should change countPositives to do a bounds check and have a private > method in StringCoding be the `@IntrinsicCandidate`. This would make it > easier to audit. Right now it's hard to audit because there are usages of > JLA.countPositives in faraway classes. I'm not suggested we do this as part > of this PR of course but it would mean the warning comment could be removed. Submitted [8356380](https://bugs.openjdk.org/browse/JDK-8356380) to address this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24982#discussion_r2077399743