Improve type safety through the use of generics

This commit is contained in:
veyndan 2017-03-31 22:15:56 +01:00
parent 16553cc5e1
commit d8b7d5b438
6 changed files with 16 additions and 17 deletions

View file

@ -49,7 +49,7 @@ public class MwVolleyApi {
return categoryList;
}
public static void setGpsCat(List cachedList) {
public static void setGpsCat(List<String> cachedList) {
categoryList = new ArrayList<>();
categoryList.addAll(cachedList);
Log.d(TAG, "Setting GPS cats from cache: " + categoryList.toString());

View file

@ -408,7 +408,7 @@ public class ShareActivity
MwVolleyApi apiCall = new MwVolleyApi(this);
List displayCatList = app.cacheData.findCategory();
List<String> displayCatList = app.cacheData.findCategory();
boolean catListEmpty = displayCatList.isEmpty();
// If no categories found in cache, call MediaWiki API to match image coords with nearby Commons categories