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

Unexpected result when adding default to a base interface #276

Closed
miKerscher opened this issue Dec 15, 2020 · 4 comments
Closed

Unexpected result when adding default to a base interface #276

miKerscher opened this issue Dec 15, 2020 · 4 comments

Comments

@miKerscher
Copy link
Contributor

miKerscher commented Dec 15, 2020

We have to following code in version 1.0.0:

interface A {
}

interface B extends A {
}

abstract class BAbstract  implements B {
}

class BImpl extends BAbstract {
}

In version 1.0.1 we add the method foo with a default implementation to A:

interface A {

   default void foo() {
       // ...
   }
}

japi-cmp produces the following incompatiblity:

JApiClass [fullyQualifiedName=BImpl, changeStatus=UNCHANGED, compatibilityChanges=[METHOD_ABSTRACT_ADDED_IN_IMPLEMENTED_INTERFACE]]

Expected is METHOD_DEFAULT_ADDED_IN_IMPLEMENTED_INTERFACE

The Problem does not occur when the version number is changed to 1.1.0

The bug can be produced in the github repo https://github.com/miKerscher/japi-cmp-repoduce-issue-276/
The master branch contains version 1.0.0
The branch dev-1.0.1 contains version 1.0.1

@garydgregory
Copy link

I've run into this many times as well, it is quite counterintuitive!

@siom79
Copy link
Owner

siom79 commented Dec 15, 2020

Added new compatibilty change METHOD_DEFAULT_ADDED_IN_IMPLEMENTED_INTERFACE.

@siom79 siom79 closed this as completed Dec 15, 2020
@miKerscher
Copy link
Contributor Author

Thank you for your fast response.
When will the new version with the fix be available?

@siom79
Copy link
Owner

siom79 commented Dec 30, 2020

Released with 0.15.1

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

No branches or pull requests

3 participants