RFR: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull [v6]
Chen Liang
liach at openjdk.org
Thu May 30 21:50:07 UTC 2024
On Thu, 30 May 2024 19:44:29 GMT, David M. Lloyd <duke at openjdk.org> wrote:
>> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
>>
>> - Add test to validate ClassReader behavior
>> - Merge branch 'master' of https://github.com/openjdk/jdk into feature/entry-by-type
>> - Null-check the entry class eagerly, avoid returning null or throwing IAE
>> - Remove redundant import
>> - Use switch
>> - Merge branch 'master' of https://github.com/openjdk/jdk into feature/entry-by-type
>> - Merge branch 'master' of https://github.com/openjdk/jdk into feature/entry-by-type
>> - Merge branch 'master' of https://github.com/openjdk/jdk into feature/entry-by-type
>> - Use constants, beautify code
>> - 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull
>
> src/java.base/share/classes/java/lang/classfile/ClassReader.java line 142:
>
>> 140: * @throws ConstantPoolException if the index is out of range of the
>> 141: * constant pool size, or zero, or the entry is not of the given type
>> 142: * @since 24
>
> I just noticed that these are marked `@since 24`. Am I correct that this should be `@since 23`?
Thanks for pointing out, I was under the assumption that this patch might not come into 23. I will create an issue, and you can make a PR if you feel like contributing (doc-only changes can integrate before RDPs so no rush)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19330#discussion_r1621460803
More information about the core-libs-dev
mailing list