[ 
https://issues.apache.org/jira/browse/IVY-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308331#comment-17308331
 ] 

Jaikiran Pai commented on IVY-1628:
-----------------------------------

Hello [~mwalker] , the implementation(s) of the MessageLogger (both the 
AbstractMessageLogger and the MessageLoggerEngine), internally use an ArrayList 
to keep track of "errors" and "warns". The code change that I did to use a copy 
constructor of ArrayList internally, in such cases, just does an Array copy and 
doesn't use the iterators, which is where the concurrent modification checks 
reside. So I believe the change in that commit should address the issue.

> ConcurrentModificationException in MessageLoggerHelper.sumupProblems
> --------------------------------------------------------------------
>
>                 Key: IVY-1628
>                 URL: https://issues.apache.org/jira/browse/IVY-1628
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>         Environment: Groovy 2.4.12
>            Reporter: Monroe Walker
>            Assignee: Jaikiran Pai
>            Priority: Major
>             Fix For: master
>
>
> Our Jenkins build job occasionally fails with 
> {code:java}
> java.util.ConcurrentModificationExceptionjava.util.ConcurrentModificationException
>  at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:911) at 
> java.util.ArrayList$Itr.next(ArrayList.java:861) at 
> org.apache.ivy.util.MessageLoggerHelper.sumupProblems(MessageLoggerHelper.java:45)
>  at 
> org.apache.ivy.util.MessageLoggerEngine.sumupProblems(MessageLoggerEngine.java:136)
>  at org.apache.ivy.util.Message.sumupProblems(Message.java:143) at 
> org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:347) at 
> org.apache.ivy.Ivy.resolve(Ivy.java:523)
> {code}
> It seems this must be due to a warning / error being logged while 
> `sumupProblems` is printing the captured warning/errors.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to