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

fix: ClassTypingContext#isSameSignature for generic methods #1639

Merged
merged 2 commits into from
Oct 23, 2017

Conversation

pvojtechovsky
Copy link
Collaborator

The method with this declaration

<U> void visitCtConditional(final CtConditional<U> conditional)

defined in class and inteface returned false for ClassTypingContext#isSameSignature(methodFromIface, methodFromClass).

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-20171021.224515-100

New API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old method spoon.reflect.declaration.CtMethod spoon.support.visitor.ClassTypingContext::adaptMethod(spoon.reflect.declaration.CtMethod)
New none
Code java.method.removed
Description Method was removed.
Breaking binary: breaking,

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-20171021.224515-100

New API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old method spoon.reflect.declaration.CtMethod spoon.support.visitor.ClassTypingContext::adaptMethod(spoon.reflect.declaration.CtMethod)
New none
Code java.method.removed
Description Method was removed.
Breaking binary: breaking,

@monperrus
Copy link
Collaborator

Indeed, there is a bug, thanks.

However, this bug fix is super hard to review because there are too many changes in the test.

The reason is that the test data (test classes and methods in this case) is changed (and not only added).

It's better to keep the same test classes/methods, and only add new ones to demonstrate the bug. Doing that, there is mostly new content in tests (as opposed to modified content), and at most a few well documented changed assertions (if the incorrect behavior was already specified and enforced).

@pvojtechovsky
Copy link
Collaborator Author

You are right. Now I did only minimum changes in existing test - because of change of useless hard to implement API method.
I also added new small test to reproduce problem.

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-20171023.182639-102

New API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old method spoon.reflect.declaration.CtMethod spoon.support.visitor.ClassTypingContext::adaptMethod(spoon.reflect.declaration.CtMethod)
New none
Code java.method.removed
Description Method was removed.
Breaking binary: breaking

@pvojtechovsky
Copy link
Collaborator Author

I am done here

@monperrus monperrus merged commit 0b41827 into INRIA:master Oct 23, 2017
@monperrus
Copy link
Collaborator

thanks Pavel

@pvojtechovsky pvojtechovsky deleted the fixIsSameSignature branch October 23, 2017 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants