Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the way the properties are collected using the Class.getMethod… #3135

Conversation

amodolo
Copy link
Contributor

@amodolo amodolo commented Aug 1, 2023

I change the way the properties are collected using the Class.getMethods() api instead iterating the class hierarchy using Class.declaredMethods(). I think that collect the properties using the getMethods api should be a better approach because:

  • it returns all public methods considering both super classes and interfaces
  • there's no need to filter public methods
  • there's no need to iterate through the class hierarchy

Moreover, in this way the properties declared in the interfaces will not be ignored.

Check List:

@scordio scordio added the theme: recursive comparison An issue related to the recursive comparison label Aug 1, 2023
@amodolo amodolo force-pushed the fix/3125_comparing_properties_include_interfaces branch 3 times, most recently from d5855d3 to b65a925 Compare August 2, 2023 20:36
@joel-costigliola
Copy link
Member

Thanks @amodolo, I will do my best to review your PR this weekend !

@joel-costigliola joel-costigliola added this to the 3.25.0 milestone Aug 2, 2023
…s() api instead iterating the class hierarchy using Class.declaredMethods(). This way the properties declared in the interfaces will not be ignored.
@amodolo amodolo force-pushed the fix/3125_comparing_properties_include_interfaces branch from 4ba926c to edfad62 Compare August 3, 2023 07:13
@joel-costigliola
Copy link
Member

Integrated thanks @amodolo!

@amodolo amodolo deleted the fix/3125_comparing_properties_include_interfaces branch August 7, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: recursive comparison An issue related to the recursive comparison
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursion comparison using properties ignores default interface methods.
3 participants