mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Return empty list if SSLException (under IOException)
This commit is contained in:
parent
e33601875b
commit
d2347d00b1
2 changed files with 6 additions and 2 deletions
|
|
@ -67,7 +67,8 @@ public class MethodAUpdater extends AsyncTask<Void, Void, ArrayList<String>> {
|
|||
.get();
|
||||
Log.d(TAG, "Method A URL filter" + result.toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
//Return empty arraylist
|
||||
return categories;
|
||||
}
|
||||
|
||||
ArrayList<ApiResult> categoryNodes = result.getNodes("/api/query/search/p/@title");
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import org.mediawiki.api.MWApi;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.net.ssl.SSLPeerUnverifiedException;
|
||||
|
||||
import fr.free.nrw.commons.CommonsApplication;
|
||||
|
||||
/**
|
||||
|
|
@ -63,7 +65,8 @@ public class PrefixUpdater extends AsyncTask<Void, Void, ArrayList<String>> {
|
|||
.get();
|
||||
Log.d(TAG, "Prefix URL filter" + result.toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
//Return empty arraylist
|
||||
return categories;
|
||||
}
|
||||
|
||||
ArrayList<ApiResult> categoryNodes = result.getNodes("/api/query/allcategories/c");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue