Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
Undefined
-
+
Description
This can happen when getters are defined in an implement interface with a different return type (a supertype); in that case we get two getters for the same property in the array returned by `Class.getMethods()`.
Since the order of methods in that array is unspecified, in some cases it will work (super method then overridden method => we keep the overridden method), and in others it won't (overridden method then super method => we keep the super method).
Changing the loop to keep the most specific getter only fixes the problem.
I wasn't able to reproduce the problem in a unit test, but I know it happens with my JVM (OpenJDK 11) for `JaxbEmbeddable.getAttributes()`, and it caused `BytecodeRecorder` to fail, especially with the tests added by #16630 .
Fixes #16954
Attachments
Issue Links
- relates to
-
QUARKUS-1074 Wrong "camel-api" version in productised RHBQ release
- Closed