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
Support for Java8 default methods #68
Comments
The thing to test is if you add a default method, binary compatibility shouldn't break. |
Yup, I know. Also turning a default method into an abstract one should be fine (as far as binary compatibility is concerned). Though, I need to check this one :-) -- Mirco Sent from mobile
|
Actually, what I just said shouldn't work. While turning an interface method into a default method should. Anyway, as said, we need a few tests ;-) -- Mirco Sent from mobile
|
Alright, looks like I was plain wrong :-) |
…bend-labs#69 As stated in Java binary compatibility doc (http://www.cs.cornell.edu/andru/javaspec/13.doc.html), "adding new fields, methods, or constructors to an existing class or interface" is a binary compatible evolution. This is probably the most surprising binary compatible evolution, and it's pretty neat. Also, by fixing this problem, we now also fully support Java8 default methods. Which is why this commit also Fix lightbend-labs#68.
I was actually half right (or half wrong you may say :-)). MiMa should have been able to correctly support Java8 default methods already, but because of #69 it wasn't. Regardless, it feels good to fix one bug and an enhancement by actually removing code! |
…bend-labs#69 As stated in Java binary compatibility doc (https://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html), "adding new fields, methods, or constructors to an existing class or interface" is a binary compatible evolution. Adding an abstract method to an interface or class is probably the most surprising binary compatible evolution, but it makes a lot of sense and it's pretty neat. Also, by fixing this problem, we now also fully support Java8 default methods. Which is why this commit also Fix lightbend-labs#68.
Fixed by #123 |
I believe that by fixing #66, MiMa now fully supports JDK8 binaries. However, it'd be good to add a few tests exercising in particular Java8 default methods.Adding a Java8 default method to an interface is reported by MiMa as a binary incompatibility. This is wrong, and should be corrected.
The text was updated successfully, but these errors were encountered: