camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r729895 - in /activemq/camel/branches/camel-1.x: ./ components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
Date Mon, 29 Dec 2008 14:18:20 GMT
Author: ningjiang
Date: Mon Dec 29 06:18:20 2008
New Revision: 729895

URL: http://svn.apache.org/viewvc?rev=729895&view=rev
Log:
Merged revisions 729892 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r729892 | ningjiang | 2008-12-29 22:09:09 +0800 (Mon, 29 Dec 2008) | 1 line
  
  CAMEL-1207 Fixed the ConcurrentModificationException when stopping the camel-osgi bundle
........

Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 29 06:18:20 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java?rev=729895&r1=729894&r2=729895&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
Mon Dec 29 06:18:20 2008
@@ -111,12 +111,15 @@
     }
 
     protected synchronized void mayBeRemoveComponentFor(Bundle bundle) {
-        for (ComponentEntry entry : components.values()) {
+        // To avoid the CurrentModificationException, do not use components.values directly

+        ComponentEntry[] entriesArray = components.values().toArray(new ComponentEntry[0]);
+        for (ComponentEntry entry : entriesArray) {
             if (entry.bundle == bundle) {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Removing entry: " + entry.path + " in bundle " + bundle.getSymbolicName());
                 }
                 components.remove(entry.name);
+                break;
             }
         }
     }



Mime
View raw message