camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Reske (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-8673) ConcurrentModificationException when creating dynamic routes
Date Tue, 21 Apr 2015 11:36:59 GMT

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

Dirk Reske updated CAMEL-8673:
------------------------------
    Description: 
The fix seems to be slightly wrong. (We still geht the ConcurrentModificationException)

The cause seems to be in removeRouteCollection and addRouteCollection. See here:
{code}
void removeRouteCollection(Collection<Route> routes) {
        synchronized (routes) {
            this.routes.removeAll(routes);
        }
}
{code}
Here the code synchronizes on the routes parameter, but should be on this.routes (as it getRoutes()
does). The same in addRouteCollection().

  was:
This Ticket refers to CAMEL-7836.
The fix seems to be slightly wrong. (We still geht the ConcurrentModificationException)

The cause seems to be in removeRouteCollection and addRouteCollection. See here:
{code}
void removeRouteCollection(Collection<Route> routes) {
        synchronized (routes) {
            this.routes.removeAll(routes);
        }
}
{code}
Here the code synchronizes on the routes parameter, but should be on this.routes (as it getRoutes()
does). The same in addRouteCollection().


> ConcurrentModificationException when creating dynamic routes
> ------------------------------------------------------------
>
>                 Key: CAMEL-8673
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8673
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.1
>            Reporter: Dirk Reske
>            Priority: Minor
>
> The fix seems to be slightly wrong. (We still geht the ConcurrentModificationException)
> The cause seems to be in removeRouteCollection and addRouteCollection. See here:
> {code}
> void removeRouteCollection(Collection<Route> routes) {
>         synchronized (routes) {
>             this.routes.removeAll(routes);
>         }
> }
> {code}
> Here the code synchronizes on the routes parameter, but should be on this.routes (as
it getRoutes() does). The same in addRouteCollection().



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

Mime
View raw message