Again I'm facing issues with generics, I thought I now know how to do this. To illustrate I created this simple example.
Given this interface
public interface Converter<A, B> {
B encode( A a);
}
why does the following error:
void onRequest(ArrayList<String> a,Converter <? extends List<String>,String> conv) {
conv.encode(a);
}
I expected that, with this notation, conv.encode would accept any param that extends List
any ideas?