You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by rf...@apache.org on 2008/02/25 21:38:35 UTC

svn commit: r630984 - /lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java

Author: rfrovarp
Date: Mon Feb 25 12:38:34 2008
New Revision: 630984

URL: http://svn.apache.org/viewvc?rev=630984&view=rev
Log:
Provide synchronization to hopefully fix bug 44059

Modified:
    lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java

Modified: lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java?rev=630984&r1=630983&r2=630984&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java Mon Feb 25 12:38:34 2008
@@ -17,6 +17,7 @@
  */
 package org.apache.lenya.transaction;
 
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -34,7 +35,7 @@
  */
 public final class IdentityMapImpl extends AbstractLogEnabled implements IdentityMap {
 
-    private Map maps = new HashMap();
+    private Map maps = Collections.synchronizedMap(new HashMap());
     
     /**
      * Ctor.
@@ -48,7 +49,7 @@
         String type = factory.getType();
         Map map = (Map) this.maps.get(type);
         if (map == null) {
-            map = new HashMap();
+            map = Collections.synchronizedMap(new HashMap());
             this.maps.put(type, map);
         }
         Object object = map.get(key);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org