RFR: JDK-8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field
Alex Menkov
amenkov at openjdk.org
Tue Oct 24 00:53:08 UTC 2023
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
-------------
Commit messages:
- FilteredFieldStream
Changes: https://git.openjdk.org/jdk/pull/16328/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16328&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8318626
Stats: 158 lines in 3 files changed: 153 ins; 4 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16328.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16328/head:pull/16328
PR: https://git.openjdk.org/jdk/pull/16328
More information about the hotspot-runtime-dev
mailing list