[
https://issues.apache.org/jira/browse/WEEX-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16611585#comment-16611585
]
ASF GitHub Bot commented on WEEX-611:
-------------------------------------
YorkShen commented on a change in pull request #1511: [WEEX-611][Android] Fix
java.lang.ArrayIndexOutOfBoundsException
URL: https://github.com/apache/incubator-weex/pull/1511#discussion_r216893838
##########
File path:
android/sdk/src/main/java/com/taobao/weex/utils/batch/BatchOperationHelper.java
##########
@@ -31,7 +32,7 @@
private BactchExecutor mExecutor;
- private ArrayList<Runnable> sRegisterTasks = new ArrayList<>();
+ private CopyOnWriteArrayList<Runnable> sRegisterTasks = new
CopyOnWriteArrayList<>();
Review comment:
`CopyOnWriteArrayList` is bad for performance in high frequency invoke
situation. Be careful
----------------------------------------------------------------
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]
> Fix java.lang.ArrayIndexOutOfBoundsException
> --------------------------------------------
>
> Key: WEEX-611
> URL: https://issues.apache.org/jira/browse/WEEX-611
> Project: Weex
> Issue Type: Improvement
> Components: Android
> Affects Versions: 0.19
> Reporter: Yayun Dong
> Assignee: YorkShen
> Priority: Major
> Fix For: 0.18
>
>
> arrayList is not thread safe, if arraylist add item in multithread may
> produce ArrayIndexOutOfBoundsException
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)