YorkShen closed pull request #1897: Fix NPE
URL: https://github.com/apache/incubator-weex/pull/1897
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/ui/SimpleComponentHolder.java
b/android/sdk/src/main/java/com/taobao/weex/ui/SimpleComponentHolder.java
index 58ebdbf9d1..3d4be30711 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/SimpleComponentHolder.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/SimpleComponentHolder.java
@@ -211,7 +211,12 @@ public Invoker getMethodInvoker(String name) {
generate();
}
Set<String> keys = mMethodInvokers.keySet();
- return keys.toArray(new String[keys.size()]);
+ try {
+ return keys.toArray(new String[keys.size()]);
+ } catch (Throwable throwable) {
+ return new String[1];
+ }
+
}
}
----------------------------------------------------------------
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]
With regards,
Apache Git Services