On Tue, 24 Oct 2023 00:46:54 GMT, Alex Menkov <amen...@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

This pull request has now been integrated.

Changeset: d1e73b12
Author:    Alex Menkov <amen...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/d1e73b1299b03a54ec0376ad0f747b4d7e64e40b
Stats:     154 lines in 3 files changed: 149 ins; 4 del; 1 mod

8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field

Reviewed-by: sspitsyn, lmesnik

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

PR: https://git.openjdk.org/jdk/pull/16328

Reply via email to