[
https://issues.apache.org/jira/browse/CONFIGURATION-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928341#action_12928341
]
Oliver Heger commented on CONFIGURATION-426:
--------------------------------------------
CompositeConfiguration is not thread-safe. If you add a new child configuration
in one thread while accessing the configuration in another thread, such
ConcurrentModificationExceptions can occur. Admitted, there is no explicit
warning in the Javadocs, but the user's guide has a general note about
thread-safety of configuration implementations:
http://commons.apache.org/configuration/userguide/overview.html#Threading_issues
When using an instance as a singleton you have to provide proper
synchronization yourself.
> ConcurrentModificationException is thrown from CompositeConfiguration.getList
> ------------------------------------------------------------------------------
>
> Key: CONFIGURATION-426
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-426
> Project: Commons Configuration
> Issue Type: Bug
> Components: Build
> Reporter: Tamir Lahav
>
> ConcurrentModificationException is thrown from
> CompositeConfiguration.getList although the object is used as "read only".
> Stack trace:
> java.util.ConcurrentModificationException
> at
> java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:632)
> at java.util.LinkedList$ListItr.next(LinkedList.java:567)
> at
> org.apache.commons.configuration.CompositeConfiguration.getList(CompositeConfiguration.java:294)
> at
> org.apache.commons.configuration.AbstractConfiguration.getList(AbstractConfiguration.java:1108)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.