Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

JIRA 7861 Report fix in 1.3.X branch

  • Loading branch information...
commit 0af41c55f28fb6f1b3f22af28ade60fa09d203aa 1 parent cdcfd92
T Poingt authored
8 src/java/org/codehaus/groovy/grails/support/SoftThreadLocalMap.java
View
@@ -16,6 +16,8 @@
package org.codehaus.groovy.grails.support;
import org.apache.commons.collections.map.ReferenceMap;
+import java.util.Collections;
+import java.util.Map;
/**
* Creates a InheritableThreadLocal with an intial value of a Map.
@@ -23,13 +25,13 @@
* @author Graeme Rocher
* @since 0.6
*/
-public class SoftThreadLocalMap extends InheritableThreadLocal<ReferenceMap> {
+public class SoftThreadLocalMap extends InheritableThreadLocal<Map> {
/**
* Creates an initial value of a Map
*/
@Override
- protected ReferenceMap initialValue() {
- return new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT);
+ protected Map initialValue() {
+ return Collections.synchronizedMap(new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT));
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.