RFR: 8332597: Remove redundant methods from j.l.classfile.ClassReader API
Adam Sotona
adam.sotona at oracle.com
Tue May 21 10:58:54 UTC 2024
Hi,
Class-File API JCK work revealed some of the inappropriately exposed methods in the API.
Below is proposal to remove two methods from j.l.classfile.ClassReader.
Please let me know any objections or review the PR and related CSR: https://bugs.openjdk.org/browse/JDK-8332598
Thank you,
Adam
j.l.classfile.ClassReader instance is exposed in the Class-File API through j.l.classfile.AttributeMapper::readAttribute method only.
ClassReader only purpose is to serve as a tool for reading content of a custom attribute in a user-provided AttribtueMapper.
It contains useful set of low-level class reading methods for user to implement a custom attribute content parser.
However methods ClassReader::thisClassPos and ClassReader::skipAttributeHolder are not necessary for a custom attribute content parsing and so redundant in the API.
Class-File API implementation internally use these methods, however they should not be exposed in the API.
This patch removes the methods from the API.
Please review.
Thanks,
Adam
-------------
Commit messages:
- 8332597: Remove redundant methods from j.l.classfile.ClassReader API
Changes: https://git.openjdk.org/jdk/pull/19323/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19323&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8332597
Stats: 26 lines in 5 files changed: 0 ins; 21 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/19323.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19323/head:pull/19323
PR: https://git.openjdk.org/jdk/pull/19323
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240521/bdfe8901/attachment-0001.htm>
More information about the classfile-api-dev
mailing list