[ https://issues.apache.org/jira/browse/SLING-5143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert closed SLING-5143. --------------------------------- > osgi-mock: MockBundleContext is not thread-safe when using iterators > -------------------------------------------------------------------- > > Key: SLING-5143 > URL: https://issues.apache.org/jira/browse/SLING-5143 > Project: Sling > Issue Type: Bug > Components: Testing > Affects Versions: Testing OSGi Mock 1.6.0 > Reporter: Stefan Seifert > Assignee: Stefan Seifert > Priority: Minor > Labels: mocks > Fix For: Testing OSGi Mock 1.7.0 > > > SLING-4845 introduced synchronized wrappers for the sets, maps and a list > used internally by MockBundleContext to make it thread-safe. > this does not cover all cases e.g. when iterating over the set oder map, > sometimes errors like this still occur: > {noformat} > [Apache Sling JCR Resource Event Queue Processor for path '/'] WARN > org.apache.sling.jcr.resource.internal.JcrResourceListener - > processOsgiEventQueue: Unexpected problem processing event > {event.topics=org/apache/sling/api/resource/Resource/ADDED, userid=admin, > resourceAddedAttributes=[Ljava.lang.String;@68fbe319, path=/content} > java.util.ConcurrentModificationException > at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1207) > at java.util.TreeMap$KeyIterator.next(TreeMap.java:1261) > at > org.apache.sling.testing.mock.osgi.MockBundleContext.getServiceReferences(MockBundleContext.java:188) > at > org.apache.sling.testing.mock.osgi.MockBundleContext.getServiceReference(MockBundleContext.java:169) > at > org.apache.sling.jcr.resource.internal.JcrResourceListener.getResourceResolver(JcrResourceListener.java:353) > at > org.apache.sling.jcr.resource.internal.JcrResourceListener.processOsgiEventQueue(JcrResourceListener.java:392) > at > org.apache.sling.jcr.resource.internal.JcrResourceListener$1.run(JcrResourceListener.java:131) > at java.lang.Thread.run(Thread.java:745) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)