geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r895856 - /geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
Date Tue, 05 Jan 2010 02:17:26 GMT
Author: kevan
Date: Tue Jan  5 02:17:23 2010
New Revision: 895856

URL: http://svn.apache.org/viewvc?rev=895856&view=rev
Log:
GERONIMO-5013 avoid multiple threads from simultaneously adding resource names to the resourcesNotFound
Set. This will avoid potential ConcurrentModificationExceptions

Modified:
    geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java?rev=895856&r1=895855&r2=895856&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
Tue Jan  5 02:17:23 2010
@@ -596,7 +596,9 @@
         // Resource not found -- no need to search for it again
         // 
         if (!resourcesNotFound.contains(name)) {
-            resourcesNotFound.add(name);
+            synchronized(resourcesNotFound) {
+                resourcesNotFound.add(name);
+            }
         }
 
         return null;



Mime
View raw message