On Thu, 12 Oct 2023 20:23:10 GMT, Alex Menkov <amen...@openjdk.org> wrote:

>> test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007/TestDescription.java
>>  line 36:
>> 
>>> 34:  *     The test checks if the function returns the expected list of 
>>> fields:
>>> 35:  *         - the list contains only directly declared (not inherited) 
>>> fields;
>>> 36:  *         - fields are returned in the order they occur in the class 
>>> file.
>> 
>> Is the order of the fields in the class file guaranteed to be the same as 
>> the declaration order?
>
> Good question.
> Javac works this way, but looks like this is not a requirement.
> Looks like the test should use some class file parser to get actual field 
> order

Updated the test to get expected field order (as well as field name and type) 
from class file

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16131#discussion_r1363009009

Reply via email to