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

Support for Java8 default methods #68

Closed
dotta opened this issue May 27, 2015 · 6 comments
Closed

Support for Java8 default methods #68

dotta opened this issue May 27, 2015 · 6 comments
Milestone

Comments

@dotta
Copy link
Contributor

dotta commented May 27, 2015

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.

@jroper
Copy link

jroper commented May 27, 2015

The thing to test is if you add a default method, binary compatibility shouldn't break.

@dotta
Copy link
Contributor Author

dotta commented May 27, 2015

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

On May 27, 2015, at 14:04, James Roper notifications@github.com wrote:

The thing to test is if you add a default method, binary compatibility shouldn't break.


Reply to this email directly or view it on GitHub.

@dotta
Copy link
Contributor Author

dotta commented May 27, 2015

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

On May 27, 2015, at 14:25, Mirco Dotta mirco.dotta@typesafe.com wrote:

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

On May 27, 2015, at 14:04, James Roper notifications@github.com wrote:

The thing to test is if you add a default method, binary compatibility shouldn't break.


Reply to this email directly or view it on GitHub.

@dotta dotta added bug and removed enhancement labels May 27, 2015
@dotta dotta changed the title Test MiMa supports full extent of JDK8 new functionalities Support for Java8 default methods May 27, 2015
@dotta dotta added enhancement and removed bug labels May 27, 2015
@dotta
Copy link
Contributor Author

dotta commented May 27, 2015

Alright, looks like I was plain wrong :-)

dotta added a commit to dotta/migration-manager that referenced this issue May 27, 2015
…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.
@dotta
Copy link
Contributor Author

dotta commented May 27, 2015

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!

dotta added a commit to dotta/migration-manager that referenced this issue May 28, 2015
…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.
@dotta dotta added this to the 0.1.8 milestone May 29, 2015
@SethTisue SethTisue modified the milestones: 0.1.8, 0.1.9 Nov 12, 2015
@2m 2m modified the milestones: 0.1.10, 0.1.9 Mar 9, 2016
@szeiger
Copy link
Contributor

szeiger commented Sep 29, 2016

Fixed by #123

@szeiger szeiger closed this as completed Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants