felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uiter...@apache.org
Subject svn commit: r1615899 - /felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
Date Tue, 05 Aug 2014 09:30:39 GMT
Author: uiterlix
Date: Tue Aug  5 09:30:38 2014
New Revision: 1615899

URL: http://svn.apache.org/r1615899
Log:
FELIX-4597: prevent concurrent modification on registering context and servlet/filter at the
same time.

Modified:
    felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java

Modified: felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java?rev=1615899&r1=1615898&r2=1615899&view=diff
==============================================================================
--- felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
(original)
+++ felix/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
Tue Aug  5 09:30:38 2014
@@ -192,8 +192,9 @@ public final class HttpContextManager
 
         this.idMap.put(id, holder);
         this.contextMap.put(context, id);
-
-        return holder.getMappings();
+        
+        // return a copy to prevent concurrent modification
+        return new HashSet<AbstractMapping>(holder.getMappings());
     }
 
     public synchronized Collection<AbstractMapping> removeHttpContext(HttpContext context)



Mime
View raw message