RFR: JDK-8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Mon Nov 27 19:19:06 UTC 2023
On Tue, 21 Nov 2023 02:58:47 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> FilteredFieldStream is intended to filter out some fields which does not represent valid java objects.
>> Currently the only filtered field is "constantPoolOop" from jdk.internal.reflect.ConstantPool class.
>> The change fixes FilteredFieldStream implementation to handle cases when filtered fields is the last field of the class ("constantPoolOop" is the only field of jdk.internal.reflect.ConstantPool)
>>
>> Testing:
>> - new test added that compares results of GetClassFields JVMTI function (it uses FilteredFieldStream) with Class.getDeclaredFields();
>> - test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields tests
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>
> feedback
Thank you for the update! Looks good.
-------------
Marked as reviewed by sspitsyn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16328#pullrequestreview-1751188065
More information about the serviceability-dev
mailing list