incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r791717 - /sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
Date Tue, 07 Jul 2009 06:37:07 GMT
Author: cziegeler
Date: Tue Jul  7 06:37:07 2009
New Revision: 791717

URL: http://svn.apache.org/viewvc?rev=791717&view=rev
Log:
Use concurrent hash map to avoid multi threading issues.

Modified:
    sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java

Modified: sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java?rev=791717&r1=791716&r2=791717&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
(original)
+++ sling/trunk/contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
Tue Jul  7 06:37:07 2009
@@ -18,8 +18,8 @@
 
 import java.util.Arrays;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.sling.rewriter.Generator;
 import org.apache.sling.rewriter.GeneratorFactory;
@@ -190,7 +190,7 @@
     protected static class HashingServiceTrackerCustomizer<T> extends ServiceTracker
{
 
         /** The services hashed by their name property. */
-        private final Map<String, T> services = new HashMap<String, T>();
+        private final Map<String, T> services = new ConcurrentHashMap<String, T>();
 
         /** The bundle context. */
         protected final BundleContext context;



Mime
View raw message