Closed davidnewcomb closed 2 years ago
I just remembered about polymorphism, so maybe my request is impossible as there can be many different signatures to the same method. So it might be impossible to match them up. Grrrr! (but with understanding)
You are right. When you have more than one method with the same name, then it is hard to say which one changed.
m(short s)
m(int i)
Turns to
m(double d)
m(float f)
Which one changed to which one?
David Newcomb @.***> schrieb am Do., 3. Feb. 2022, 18:55:
I just remembered about polymorphism, so maybe my request is impossible as there can be many different signatures to the same method. So it might be impossible to match them up. Grrrr! (but with understanding)
— Reply to this email directly, view it on GitHub https://github.com/siom79/japicmp/issues/319#issuecomment-1029249824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4U7NHUL6EXAAHU5VYXNRDUZK6S3ANCNFSM5NPST7EQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
I was thinking that if there was just one in the old and new then you could assume, but this is just my test case. In real life there are classes with loads of polymorphic signatures.
I'm closing this, as having given it a second thought, I don't think it's something that should be done. Having an 'add' and 'remove' does make more sense.
Same problem in 0.15.4 + 0.15.6
Old code:
New code:
The signature is the only change the method name remains the same. However, I get 2 changes. I put this code in the groovy script to help me see what is happening:
And get this out (I have added extra spaces for you to make it nice :) )
I think that there is only 1 method with an old and new and so it should return something like this:
The old method has annotations which I need to know in order to work out if I can output this method in the results.
It's starting to look like I need some extra magic to find both sides of the modification equation and glue them together but really I think that work falls on your side of the fence ...as there is still just one method!
Does this look right to you? Am I missing an option to glue them together? Or are they supposed to be separate changes?