Bug 1262811 - Don't accidentally log a null message. r=sebastian
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Thu, 07 Apr 2016 11:04:00 -0400
changeset 348530 3175145264a4e673ac80f04efab24aee9c69043b
parent 348529 f5d7c57cdfd7574361db3a1b555db546c4ccaf22
child 348531 c72c4adf49121c74257da7e91e4deb9a90363427
push id14833
push usermleibovic@mozilla.com
push dateThu, 07 Apr 2016 15:09:43 +0000
reviewerssebastian
bugs1262811
milestone48.0a1
Bug 1262811 - Don't accidentally log a null message. r=sebastian MozReview-Commit-ID: DGAAGMZyNlG
mobile/android/thirdparty/com/keepsafe/switchboard/SwitchBoard.java
--- a/mobile/android/thirdparty/com/keepsafe/switchboard/SwitchBoard.java
+++ b/mobile/android/thirdparty/com/keepsafe/switchboard/SwitchBoard.java
@@ -87,25 +87,24 @@ public class SwitchBoard {
     static void loadConfig(Context c, String uuid, @NonNull String defaultServerUrl) {
 
         // Eventually, we want to check `Preferences.getDynamicConfigServerUrl(c);` before
         // falling back to the default server URL. However, this will require figuring
         // out a new solution for dynamically specifying a new server from the intent.
         String serverUrl = defaultServerUrl;
 
         final URL requestUrl = buildConfigRequestUrl(c, uuid, serverUrl);
+        if (DEBUG) Log.d(TAG, "Request URL: " + requestUrl);
         if (requestUrl == null) {
             return;
         }
 
-        if (DEBUG) Log.d(TAG, requestUrl.toString());
 
         final String result = readFromUrlGET(requestUrl);
-        if (DEBUG) Log.d(TAG, result);
-
+        if (DEBUG) Log.d(TAG, "Result: " + result);
         if (result == null) {
             return;
         }
 
         try {
             final JSONObject json = new JSONObject(result);
 
             // Update the server URL if necessary.