On Wed, 11 Oct 2023 00:39:23 GMT, Alex Menkov <amen...@openjdk.org> wrote:
> All test cases in getclfld007 had 1 (or 0) field in test classes/interfaces. > The change adds several fields in one of the test classes to verify order of > the returned fields (as described by GetClassFields spec: "in the order they > occur in the class file"). > Field order in the class file is not guaranteed to be the same as in the > source, so information about expected fields and expected order is extracted > by ASM (it parses class file sequentially). > This allows to drop hardcoded field name/type in native part. > > Additionally did some test cleanup: > - dropped "printdump" stuff (the test always logs reported fields); > - removed unused `generic` in native check() method, added deallocation of > `name` and `sig` This pull request has now been integrated. Changeset: 599560a8 Author: Alex Menkov <amen...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/599560a832386d9c61aca24450d6efa65156f663 Stats: 176 lines in 3 files changed: 62 ins; 52 del; 62 mod 8317635: Improve GetClassFields test to verify correctness of field order Reviewed-by: cjplummer, sspitsyn ------------- PR: https://git.openjdk.org/jdk/pull/16131