summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Kirk <askirk@umich.edu>2017-01-31 15:17:50 -0500
committerAustin Kirk <askirk@umich.edu>2017-01-31 15:17:50 -0500
commit6434edc23273cf5ffa2b2885e536c7b92d3c4052 (patch)
tree82323fcc745d0d9b5da497a57b9ed324ab4fb89e
parent5a5ad935e708f6160a77c61801e756284921cbc8 (diff)
downloadsdl_android-6434edc23273cf5ffa2b2885e536c7b92d3c4052.tar.gz
Catch NPE in case the Servers are downbugfix/issue_390
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/util/HttpRequestTask.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/sdl_android_lib/src/com/smartdevicelink/util/HttpRequestTask.java b/sdl_android_lib/src/com/smartdevicelink/util/HttpRequestTask.java
index 3d26b2994..5e8bba95c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/util/HttpRequestTask.java
+++ b/sdl_android_lib/src/com/smartdevicelink/util/HttpRequestTask.java
@@ -137,6 +137,9 @@ public class HttpRequestTask extends AsyncTask<String, String, String> {
} catch (IOException e) {
e.printStackTrace();
+ } catch (NullPointerException e){ // Only to catch error in urlConnection.getOutputStream() - when servers are down
+ e.printStackTrace();
+ urlConnection = null;
}
finally {
if (urlConnection != null) {