You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/28 08:45:14 UTC

[08/30] incubator-weex git commit: * [andriod] catch ConcurrentModificationException

* [andriod]  catch ConcurrentModificationException


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

Branch: refs/heads/dev
Commit: 25a6dbd17822b5f2cd97ff8bf67cca0b455a06c5
Parents: 9f087ec
Author: zshshr <zh...@gmail.com>
Authored: Thu Jun 22 22:53:39 2017 +0800
Committer: zshshr <zh...@gmail.com>
Committed: Thu Jun 22 22:53:39 2017 +0800

----------------------------------------------------------------------
 .../weex/ui/component/list/BasicListComponent.java  | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/25a6dbd1/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
index 4f897f3..306be55 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
@@ -330,16 +330,20 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
         super.onScrolled(recyclerView, dx, dy);
         List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
         if (listeners != null && listeners.size() > 0) {
-          for (OnWXScrollListener listener : listeners) {
-            if (listener != null) {
-              if(listener instanceof ICheckBindingScroller){
-                if(((ICheckBindingScroller) listener).isNeedScroller(getRef(),null)){
+          try {
+            for (OnWXScrollListener listener : listeners) {
+              if (listener != null) {
+                if (listener instanceof ICheckBindingScroller) {
+                  if (((ICheckBindingScroller) listener).isNeedScroller(getRef(), null)) {
+                    listener.onScrolled(recyclerView, dx, dy);
+                  }
+                } else {
                   listener.onScrolled(recyclerView, dx, dy);
                 }
-              }else {
-                listener.onScrolled(recyclerView, dx, dy);
               }
             }
+          } catch (Exception e) {
+            e.printStackTrace();
           }
         }
       }