Repository: incubator-weex
Updated Branches:
  refs/heads/master 88670072a -> d0d4f246e


*[android] fix npe.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/df730408
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/df730408
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/df730408

Branch: refs/heads/master
Commit: df7304083b7e3bda26d7067ea36df45f8afc6e3a
Parents: 8867007
Author: 驱影 <jike....@alibaba-inc.com>
Authored: Mon May 14 19:57:48 2018 +0800
Committer: YorkShen <shenyua...@gmail.com>
Committed: Tue May 15 11:27:28 2018 +0800

----------------------------------------------------------------------
 android/sdk/libs/armeabi/libweexjsc.so            | Bin 939976 -> 0 bytes
 .../java/com/taobao/weex/bridge/WXBridge.java     |   5 ++++-
 .../com/taobao/weex/ui/RenderContextImpl.java     |   7 ++++++-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df730408/android/sdk/libs/armeabi/libweexjsc.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
deleted file mode 100644
index 6fb838d..0000000
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df730408/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
index 37e4493..f335a8a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
@@ -212,7 +212,10 @@ public class WXBridge implements IWXBridge {
    */
   @Override
   public Object callNativeModule(String instanceId, String module, String 
method, byte[] arguments, byte[] options) {
-    JSONArray argArray = JSON.parseArray(new String(arguments));
+    JSONArray argArray = null;
+    if (arguments != null) {
+      argArray = JSON.parseArray(new String(arguments));
+    }
     JSONObject optionsObj = null;
     if (options != null) {
       optionsObj = JSON.parseObject(new String(options));

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df730408/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
----------------------------------------------------------------------
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
index c63bc2b..d5093d1 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/RenderContextImpl.java
@@ -48,7 +48,11 @@ class RenderContextImpl implements RenderContext {
 
   public void destroy() {
     mWXSDKInstance = null;
-    mRegistry.clear();
+    try {
+      mRegistry.clear();
+    } catch (Throwable e) {
+      e.printStackTrace();
+    }
   }
 
   public WXSDKInstance getWXSDKInstance() {
@@ -69,6 +73,7 @@ class RenderContextImpl implements RenderContext {
     mRegistry.put(ref, comp);
   }
 
+  @Override
   public WXComponent unregisterComponent(String ref) {
     return mRegistry.remove(ref);
   }

Reply via email to