Hi, IMHO it is a MINOR change because it is not a breaking change. ☺
With that change neither implementations of the Foo interface, nor classes that extend the abstract Bar class will break. Implementations of the Foo interface can still implement the doFoo() method and by doing this override the default behavior. Overriding a default is not a breaking change as you neither add a new public method or field, you just give a default implementation. Classes that extend Bar did not need to implement doFoo() before, as it was implemented in Bar. Removing that method would be typically a breaking change. But you are moving it as default method to the Foo interface. Therefore Bar still has the doFoo() method implemented, as it is provided by the Foo interface. I have to admit that I am not 100% sure about the byte code in the end and if that matters. But as a user of the interface and abstract class, nothing breaks. Mit freundlichen Grüßen / Best regards Dirk Fauth Automotive Service Solutions, ESI application (AA-AS/EIS2-EU) Robert Bosch GmbH | Postfach 11 29 | 73201 Plochingen | GERMANY | www.bosch.com<http://www.bosch.com> Tel. +49 7153 666-1155 | dirk.fa...@de.bosch.com<mailto:dirk.fa...@de.bosch.com> Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000; Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner, Prof. Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. Markus Heyn, Dr. Dirk Hoheisel, Christoph Kübel, Uwe Raschke, Peter Tyroller Von: osgi-dev-boun...@mail.osgi.org [mailto:osgi-dev-boun...@mail.osgi.org] Im Auftrag von Raymond Auge via osgi-dev Gesendet: Dienstag, 5. Dezember 2017 00:26 An: OSGi Developer Mail List <osgi-dev@mail.osgi.org> Betreff: [osgi-dev] making an existing interface method default causes MINOR baseline change Hey All, I think the answer is "Yes it's a MINOR change", but I wanted to clarify. Assume I have the following interface in an exported package: public interface Foo { public void doFoo(); } And in the same package I have abstract class Bar which implements Foo: public abstract class Bar implements Foo { public void doFoo() {...} public abstract void doBar(); } And I want to migrate to a default method because doFoo() logic rarely changes: public interface Foo { public default void doFoo() {...} } public abstract class Bar implements Foo { //public void doFoo() {...} public abstract void doBar(); } Can someone explain why this is a MINOR change? -- Raymond Augé<http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect Liferay, Inc.<http://www.liferay.com> (@Liferay) Board Member & EEG Co-Chair, OSGi Alliance<http://osgi.org> (@OSGiAlliance)
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev