camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7836) ConcurrentModificationException when creating dynamic routes
Date Sun, 21 Sep 2014 09:25:34 GMT

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

Claus Ibsen resolved CAMEL-7836.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 2.15.0
                   2.14.1
                   2.13.3
         Assignee: Claus Ibsen

> ConcurrentModificationException when creating dynamic routes
> ------------------------------------------------------------
>
>                 Key: CAMEL-7836
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7836
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.13.1
>            Reporter: Matt Nathan
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.13.3, 2.14.1, 2.15.0
>
>
> There is a (small) chance of ConcurrentModificationException when creating routes dynamically.
> {noformat}
> java.util.ConcurrentModificationException
>   at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
>   at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:384)
>   at java.util.AbstractCollection.toArray(AbstractCollection.java:124)
>   at java.util.ArrayList.&lt;init&gt;(ArrayList.java:131)
>   at org.apache.camel.impl.DefaultCamelContext.getRoutes(DefaultCamelContext.java:650)
>   at org.apache.camel.impl.DefaultCamelContext.getRoute(DefaultCamelContext.java:655)
> {noformat}
> The cause is that if you happen to be calling {{getRoute}} at the same time you are creating
a new route then the internals of {{new ArrayList}} call {{collection.toArray}} which throws
the error.



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

Mime
View raw message