Why widening generic method parameter counts as major API change?

7 views
Skip to first unread message

Przemysław Wesołek

unread,
Aug 22, 2016, 5:57:50 AM8/22/16
to bndtools-users
Hi,

inspired by a discussion of major API change in Javaslang library (https://gist.github.com/danieldietrich/fbc4121908782ef0314e3f876b392833), I checked, and the case is also valid in currend BND/Bndtools.

When one has an interface:

package test.bundle;

import java.util.List;

public interface TestBundle {
   
<T> T foo(List<T> list);
}

widening the list parameter type to List<? extends T> causes Bndtools to claim that the major API change occurs in test.bundle package.

What is the case when this is really the major API change? Specifically, the binary compatibility is kept due to type erasure.

Przemek

Reply all
Reply to author
Forward
0 new messages