[
https://issues.apache.org/jira/browse/WEEX-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577951#comment-16577951
]
ASF GitHub Bot commented on WEEX-562:
-------------------------------------
YorkShen closed pull request #1425: [WEEX-562][Android] task may be null
,should be check ,not try/catch
URL: https://github.com/apache/incubator-weex/pull/1425
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index b52fe1fda1..c20c2f160f 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -1744,14 +1744,15 @@ private void invokeCallJSBatch(Message message) {
break;
}
}
- task = ((ArrayList) task).toArray();
+ if (null != task){
+ task = ((ArrayList) task).toArray();
- WXJSObject[] args = {
- new WXJSObject(WXJSObject.String, instanceId),
- WXWsonJSONSwitch.toWsonOrJsonWXJSObject(task)};
-
- invokeExecJS(String.valueOf(instanceId), null, METHOD_CALL_JS, args);
+ WXJSObject[] args = {
+ new WXJSObject(WXJSObject.String, instanceId),
+ WXWsonJSONSwitch.toWsonOrJsonWXJSObject(task)};
+ invokeExecJS(String.valueOf(instanceId), null, METHOD_CALL_JS, args);
+ }
} catch (Throwable e) {
WXLogUtils.e("WXBridgeManager", e);
String err = "invokeCallJSBatch#" + WXLogUtils.getStackTrace(e);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Android] task may be null ,should be check ,not try/catch
> ----------------------------------------------------------
>
> Key: WEEX-562
> URL: https://issues.apache.org/jira/browse/WEEX-562
> Project: Weex
> Issue Type: Bug
> Components: Android
> Reporter: peihan
> Assignee: YorkShen
> Priority: Major
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)