[ 
https://issues.apache.org/jira/browse/SLING-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antonio Sanso updated SLING-4903:
---------------------------------
    Attachment: SLING-4883-patch.txt

attaching strawman patch. 
[~chetanm] WDYT?

The idea is to use CopyOnWriteArrayList rather then ArrayList. The only gotcha 
is that CopyOnWriteArrayList doesn;t support Collection.sort

> ConcurrentModificationException in MapEntries
> ---------------------------------------------
>
>                 Key: SLING-4903
>                 URL: https://issues.apache.org/jira/browse/SLING-4903
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>            Reporter: Antonio Sanso
>            Assignee: Antonio Sanso
>         Attachments: SLING-4883-patch.txt, SLING-4883-test-patch.txt
>
>
> {code}
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught 
> Throwable java.util.ConcurrentModificationException: null
>  at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
>  at java.util.ArrayList$Itr.next(ArrayList.java:831)
>  at 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries$MapEntryIterator.seek(MapEntries.jav
>  a:1499)
>  at 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries$MapEntryIterator.next(MapEntries.jav
>  a:1450)
>  at 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries$MapEntryIterator.next(MapEntries.jav
>  a:1411)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverIm
>  pl.java:251)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:
>  192)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to