From d80980bf4b8fc7aee40082978f03f86f24056739 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Thu, 29 Aug 2024 10:58:15 -0700 Subject: [PATCH] Move the resultString outside the inner try block Following up on https://github.com/e-mission/cordova-server-communication/commit/ebaf266a90362450db75983c8838d0c7cfeb1dcb I created two `try/catch` blocks but didn't move the relativeURL out. Argh! commit churn! --- src/android/CommunicationHelperPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/CommunicationHelperPlugin.java b/src/android/CommunicationHelperPlugin.java index 930dd89..7aa068f 100644 --- a/src/android/CommunicationHelperPlugin.java +++ b/src/android/CommunicationHelperPlugin.java @@ -24,8 +24,8 @@ public boolean execute(String action, JSONArray data, final CallbackContext call cordova.getThreadPool().execute(new Runnable() { public void run() { try { + String resultString = CommunicationHelper.pushGetJSON(ctxt, fullURL, filledMessage); try { - String resultString = CommunicationHelper.pushGetJSON(ctxt, fullURL, filledMessage); callbackContext.success(new JSONObject(resultString)); } catch (JSONException e) { callbackContext.error("While pushing/getting from server, "