You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org> on 2009/08/14 22:18:37 UTC

[jira] Created: (CAMEL-1912) DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException

DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException
----------------------------------------------------------------------------------

                 Key: CAMEL-1912
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1912
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0-M3, 2.0-M2, 1.6.1, 2.0-M1, 1.6.0, 1.5.0, 1.6.2, 2.0.0
            Reporter: Eric Haszlakiewicz
            Priority: Minor


The removeEndpoints() method iterates over the endpoints map, and attempts to remove entries inside of the iterator loop.  This causes near immediate ConcurrentModificationException's.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-1912) DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1912:
----------------------------------

    Assignee: Claus Ibsen

> DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1912
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1912
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0
>            Reporter: Eric Haszlakiewicz
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: DefaultCamelContext.java.diff
>
>
> The removeEndpoints() method iterates over the endpoints map, and attempts to remove entries inside of the iterator loop.  This causes near immediate ConcurrentModificationException's.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1912) DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException

Posted by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Haszlakiewicz updated CAMEL-1912:
--------------------------------------

    Attachment: DefaultCamelContext.java.diff

This is a patch against the current version of /trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (r800180) that should fix the problem

> DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1912
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1912
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0
>            Reporter: Eric Haszlakiewicz
>            Priority: Minor
>         Attachments: DefaultCamelContext.java.diff
>
>
> The removeEndpoints() method iterates over the endpoints map, and attempts to remove entries inside of the iterator loop.  This causes near immediate ConcurrentModificationException's.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1912) DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1912.
--------------------------------

    Resolution: Fixed

trunk: 819860

> DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1912
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1912
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0
>            Reporter: Eric Haszlakiewicz
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: DefaultCamelContext.java.diff
>
>
> The removeEndpoints() method iterates over the endpoints map, and attempts to remove entries inside of the iterator loop.  This causes near immediate ConcurrentModificationException's.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1912) DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1912:
-------------------------------

    Fix Version/s: 2.1.0

Thanks for contributing. Will get it in the next release after 2.0 as 2.0 is currently being build.

I would suggest to use a Collections.unmodifiedList wrapper instead of copying to new array in the first 1-2 methods.

And the code in the remove could use generics instead of the type cast and it should comply with the checkstyle

See *building with checkstyle*
http://camel.apache.org/building.html

> DefaultCamelContext.removeEndpoints() fails due to ConcurrentModificationException
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1912
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1912
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0
>            Reporter: Eric Haszlakiewicz
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: DefaultCamelContext.java.diff
>
>
> The removeEndpoints() method iterates over the endpoints map, and attempts to remove entries inside of the iterator loop.  This causes near immediate ConcurrentModificationException's.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.