sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SLING-7371) ResourceProviderTracker.updateProviderContext can cause ConcurrentModificationException
Date Tue, 09 Jan 2018 21:46:00 GMT
Karl Pauls created SLING-7371:
---------------------------------

             Summary: ResourceProviderTracker.updateProviderContext can cause ConcurrentModificationException
                 Key: SLING-7371
                 URL: https://issues.apache.org/jira/browse/SLING-7371
             Project: Sling
          Issue Type: Bug
          Components: ResourceResolver
    Affects Versions: Resource Resolver 1.5.32
            Reporter: Karl Pauls
            Assignee: Karl Pauls
             Fix For: Resource Resolver 1.5.34


The updateProviderContext method accesses the "handler" member outside of a "synchronized
(this.handler)" block which can lead to a ConcurrentModificationException similar to:


{noformat}
java.util.ConcurrentModificationException: null
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker.updateProviderContext(ResourceProviderTracker.java:484)
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker.activate(ResourceProviderTracker.java:352)
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker.register(ResourceProviderTracker.java:190)
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker.access$200(ResourceProviderTracker.java:59)
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker$1.addingService(ResourceProviderTracker.java:130)
	at org.apache.sling.resourceresolver.impl.providers.ResourceProviderTracker$1.addingService(ResourceProviderTracker.java:106)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message