RFR: JDK-8318563: GetClassFields should not use random access to field [v2]
Alex Menkov
amenkov at openjdk.org
Thu Jan 11 00:33:22 UTC 2024
On Wed, 10 Jan 2024 23:12:40 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> Ok. I see now how the old code was actually reversing the order to undo the reversing that was already done.
>
>> I think the indent here should be 4, not 6.
>
> I updated indentation to be consistent with other multi-line statements in the file
> It's a bit confusing to have FilteredJavaFieldStream in reflectionUtils; eventually it would probably make sense to move the FilteredFieldsMap and FilteredjavaFieldStream into fieldStreams instead?
We have only 2 users of FilteredJavaFieldStream - GetClassFields and heap walking API implementation.
fieldStreams is light-weight (it has only header files) and used in many places, and FilteredFieldsMap would add dependency on several additional headers.
So prefer to keep all this stuff in reflectionUtils (at least for now).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17094#discussion_r1448139416
More information about the serviceability-dev
mailing list