it works.
method declaration
<T> Session<T> start(Criteria<T> criteria, List<Property<T>> orders);
usage
Criteria<? extends Product> criteria = Utils.getCriteria();
Session<? extends Product> session = null;
session = Service.start(criteria, null);
it doesn't work.
method declaration
<T> List<Session<T>> start(Criteria<T> criteria, List<Property<T>> orders)
usage
Criteria<? extends Product> criteria = Utils.getCriteria();
List<Session<? extends Product>> sessions = null;
sessions = Service.start(criteria, null);
error message
Type mismatch: cannot convert from List<Session<capture#2-of ? extends Product>> to List<Session<? extends Product>>
if I change method declaration to this, it works.
<T> List<Session<? extends T>> start(Criteria<? extends T> criteria, List<Property<? extends T>> orders)
why doen't this method declaration work?
<T> List<Session<T>> start(Criteria<T> criteria, List<Property<T>> orders)