Merge pull request #321 from DevFactory/release/collection-interfaces-should-be-used-fix-1

Code quality fix - Declarations should use Java collection interfaces such as "List" rather than specific implementation.
This commit is contained in:
Christian Schabesberger
2016-07-25 00:46:33 +02:00
committed by GitHub
6 changed files with 16 additions and 14 deletions
@@ -1,9 +1,7 @@
package org.schabi.newpipe.extractor;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
/**
* Created by Christian Schabesberger on 10.08.15.
@@ -43,7 +41,7 @@ public abstract class SearchEngine {
return collector;
}
public abstract ArrayList<String> suggestionList(
public abstract List<String> suggestionList(
String query,String contentCountry, Downloader dl)
throws ExtractionException, IOException;
@@ -22,6 +22,7 @@ import java.net.URLEncoder;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -130,10 +131,10 @@ public class YoutubeSearchEngine extends SearchEngine {
}
@Override
public ArrayList<String> suggestionList(String query, String contentCountry, Downloader dl)
public List<String> suggestionList(String query, String contentCountry, Downloader dl)
throws IOException, ParsingException {
ArrayList<String> suggestions = new ArrayList<>();
List<String> suggestions = new ArrayList<>();
/* Cant use Uri.Bilder since it's android code.
// Android code is baned from the extractor side.