RFR: JDK-8318563: GetClassFields should not use random access to field [v2]
Alex Menkov
amenkov at openjdk.org
Wed Jan 10 23:15:22 UTC 2024
On Wed, 10 Jan 2024 17:28:33 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> FieldStream from reflectionUtils iterates fields in reverse order, so reversing again was previously needed here. JavaFieldStream from fieldStreams (and the new FilteredJavaFieldStream) iterate in the order the fields actually occur, so this double-reversing isn't needed anymore.
>>
>> 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?
>
> 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17094#discussion_r1448092338
More information about the hotspot-dev
mailing list