felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uiter...@apache.org
Subject svn commit: r1298396 - /felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/AspectFilterIndex.java
Date Thu, 08 Mar 2012 14:02:41 GMT
Author: uiterlix
Date: Thu Mar  8 14:02:40 2012
New Revision: 1298396

URL: http://svn.apache.org/viewvc?rev=1298396&view=rev
Log:
added synchronization to prevent infinite loop in hashmap

Modified:
    felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/AspectFilterIndex.java

Modified: felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/AspectFilterIndex.java
URL: http://svn.apache.org/viewvc/felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/AspectFilterIndex.java?rev=1298396&r1=1298395&r2=1298396&view=diff
==============================================================================
--- felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/AspectFilterIndex.java
(original)
+++ felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/index/AspectFilterIndex.java
Thu Mar  8 14:02:40 2012
@@ -129,7 +129,10 @@ public class AspectFilterIndex implement
         List /* <ServiceReference> */ result = new ArrayList();
         FilterData data = getFilterData(clazz, filter);
         if (data != null) {
-            SortedSet /* <ServiceReference> */ list = (SortedSet) m_sidToServiceReferencesMap.get(Long.valueOf(data.serviceId));
+        	SortedSet /* <ServiceReference> */ list = null;
+        	synchronized (m_sidToServiceReferencesMap) {
+        		list = (SortedSet) m_sidToServiceReferencesMap.get(Long.valueOf(data.serviceId));
+			}
             if (list != null) {
                 Iterator iterator = list.iterator();
                 while (iterator.hasNext()) {



Mime
View raw message