Fix warning of generics

This commit is contained in:
Mauricio Colli 2018-01-13 17:08:48 -02:00
parent 9de63f8c0a
commit cfd3ab3500

View File

@ -46,7 +46,7 @@ public abstract class ListExtractor extends Extractor {
/**
* The current list of items to this result
*/
public final List<InfoItem> nextItemsList;
public final List<? extends InfoItem> nextItemsList;
/**
* Next url to fetch more items
@ -58,11 +58,11 @@ public abstract class ListExtractor extends Extractor {
*/
public final List<Throwable> errors;
public NextItemsResult(InfoItemCollector collector, String nextItemsUrl) {
public NextItemsResult(InfoItemCollector<? extends InfoItem, ?> collector, String nextItemsUrl) {
this(collector.getItemList(), nextItemsUrl, collector.getErrors());
}
public NextItemsResult(List<InfoItem> nextItemsList, String nextItemsUrl, List<Throwable> errors) {
public NextItemsResult(List<? extends InfoItem> nextItemsList, String nextItemsUrl, List<Throwable> errors) {
this.nextItemsList = nextItemsList;
this.nextItemsUrl = nextItemsUrl;
this.errors = errors;
@ -72,7 +72,7 @@ public abstract class ListExtractor extends Extractor {
return nextItemsUrl != null && !nextItemsUrl.isEmpty();
}
public List<InfoItem> getNextItemsList() {
public List<? extends InfoItem> getNextItemsList() {
return nextItemsList;
}