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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.