You’re right. Since the impact is so low we did consider making this a MICRO 
change. 

However, in bnd we remove the micro qualifier to prevent the static transitive 
graph that Maven requires. I.e. the MICRO is the ‘oil’ between the modules, it 
may not signal incompatibility. However, this implies that a MICRO change is 
not only backward compatible but also forward compatible. Turning an interface 
method into a default method is, however, not forward compatible. A bundle 
compiled against the later MICRO version does require that version to be 
present in runtime, unlike a bug fix or documentation fix but does not require 
this micro version because the MICRO is stripped.

Kind regards,

        Peter Kriens







> On 5 Dec 2017, at 07:43, Fauth Dirk (AA-AS/EIS2-EU) via osgi-dev 
> <osgi-dev@mail.osgi.org> wrote:
> 
> Hi,
>  
> IMHO it is a MINOR change because it is not a breaking change. J
>  
> 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

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to