felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uiter...@apache.org
Subject svn commit: r1298372 - /felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/tracker/AbstractTracked.java
Date Thu, 08 Mar 2012 12:13:35 GMT
Author: uiterlix
Date: Thu Mar  8 12:13:35 2012
New Revision: 1298372

URL: http://svn.apache.org/viewvc?rev=1298372&view=rev
Log:
added synchronization

Modified:
    felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/tracker/AbstractTracked.java

Modified: felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/tracker/AbstractTracked.java
URL: http://svn.apache.org/viewvc/felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/tracker/AbstractTracked.java?rev=1298372&r1=1298371&r2=1298372&view=diff
==============================================================================
--- felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/tracker/AbstractTracked.java
(original)
+++ felix/sandbox/uiterlix/dependencymanager/core/src/main/java/org/apache/felix/dm/tracker/AbstractTracked.java
Thu Mar  8 12:13:35 2012
@@ -371,7 +371,9 @@ abstract class AbstractTracked {
 	 * @GuardedBy this
 	 */
 	int size() {
-		return tracked.size();
+		synchronized (this) {
+			return tracked.size();
+		}
 	}
 
 	/**
@@ -383,7 +385,9 @@ abstract class AbstractTracked {
 	 * @GuardedBy this
 	 */
 	Object getCustomizedObject(final Object item) {
-		return tracked.get(item);
+		synchronized (this) {
+			return tracked.get(item);
+		}
 	}
 
 	/**
@@ -395,7 +399,9 @@ abstract class AbstractTracked {
 	 * @GuardedBy this
 	 */
 	Object[] getTracked(final Object[] list) {
-		return tracked.keySet().toArray(list);
+		synchronized (this) {
+			return tracked.keySet().toArray(list);
+		}
 	}
 
 	/**



Mime
View raw message