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

Method correspondence is overly simplistic #1

Closed
metlos opened this issue Dec 2, 2014 · 2 comments
Closed

Method correspondence is overly simplistic #1

metlos opened this issue Dec 2, 2014 · 2 comments
Assignees

Comments

@metlos
Copy link
Member

metlos commented Dec 2, 2014

Currently the correspondence of methods from the two versions of the API is based purely on the containing type and method name.

This is overly simplistic in presence of overloaded methods where we don't always find the closest match and might report false positives or worse miss API changes altogether.

@metlos metlos added the bug label Dec 2, 2014
@metlos metlos self-assigned this Dec 2, 2014
@metlos metlos added this to the 0.2.0 milestone Dec 2, 2014
@metlos
Copy link
Member Author

metlos commented Dec 3, 2014

The situation is not that bad as I originally thought but it is a real problem.

The natural order of methods is based on their erased signature. When 2 methods on the same position in the two element trees are compared for correspondence they are detected as corresponding if their defining type and their name matches. This means that the correspondence is robust against return type changes, parameter type changes and parameter number changes.

But the analysis still can get confused because the natural order is based on alphabetical order of the erased signatures which might cause sub-optimal matches during the comparison of the 2 versions of the APIs.

@metlos metlos added the java label Dec 3, 2014
@metlos metlos modified the milestones: 0.2.0, 0.3.0 Dec 4, 2014
@metlos metlos modified the milestones: 1.0.0, 0.3.0 Feb 24, 2015
@metlos
Copy link
Member Author

metlos commented Oct 26, 2015

This has been fixed in the API version 0.4.0 (used by revapi-java-0.5.0 and revapi-maven-plugin-0.3.9).

@metlos metlos closed this as completed Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant