summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-04-01 02:02:59 +0200
committercyBerta <cyberta@riseup.net>2019-04-01 02:02:59 +0200
commit7932f484643b9d3bb93cc4cfa0b5c60308e67227 (patch)
tree1d8ccdb0ab4d404eb10157f61f4d2d81a5e6b35f /app
parentced2e5f4973fb8aae015f8d2ec2e3cd70d450ea7 (diff)
catch NPE in ProviderManager
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
index a36c2dec..dd9070af 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
@@ -110,7 +110,7 @@ public class ProviderManager implements AdapteeCollection<Provider> {
this.externalFilesDir = externalFilesDir;
customProviders = externalFilesDir != null && externalFilesDir.isDirectory() ?
providersFromFiles(externalFilesDir.list()) :
- new HashSet<Provider>();
+ new HashSet<>();
customProviderURLs = getProviderUrlSetFromProviderSet(customProviders);
}
@@ -121,7 +121,7 @@ public class ProviderManager implements AdapteeCollection<Provider> {
String mainUrl = extractMainUrlFromInputStream(getInputStreamFrom(externalFilesDir.getAbsolutePath() + "/" + file));
providers.add(new Provider(new URL(mainUrl)));
}
- } catch (MalformedURLException | FileNotFoundException e) {
+ } catch (MalformedURLException | FileNotFoundException | NullPointerException e) {
e.printStackTrace();
}