RFR: JDK-8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field [v2]

Alex Menkov amenkov at openjdk.org
Tue Nov 21 02:58:47 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

Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:

  feedback

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/16328/files
  - new: https://git.openjdk.org/jdk/pull/16328/files/541f9f32..ce61c093

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16328&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16328&range=00-01

  Stats: 168 lines in 3 files changed: 82 ins; 86 del; 0 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 serviceability-dev mailing list