tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkemn...@apache.org
Subject [2/2] tapestry-5 git commit: TAP5-2520, TAP5-2526: synchronize access to the cache because CaseInsensitiveMap is not thread-safe
Date Mon, 11 Jan 2016 09:39:12 GMT
TAP5-2520, TAP5-2526: synchronize access to the cache because CaseInsensitiveMap is not thread-safe


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e2a092b6
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e2a092b6
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e2a092b6

Branch: refs/heads/master
Commit: e2a092b6c56f1f12accff5d5f3df37dd53259798
Parents: 15a1dbf
Author: Jochen Kemnade <jochen.kemnade@eddyson.de>
Authored: Mon Jan 11 10:38:01 2016 +0100
Committer: Jochen Kemnade <jochen.kemnade@eddyson.de>
Committed: Mon Jan 11 10:38:01 2016 +0100

----------------------------------------------------------------------
 .../internal/services/assets/JavaScriptStackAssemblerImpl.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e2a092b6/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/JavaScriptStackAssemblerImpl.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/JavaScriptStackAssemblerImpl.java
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/JavaScriptStackAssemblerImpl.java
index 3299af7..fb81bfc 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/JavaScriptStackAssemblerImpl.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/JavaScriptStackAssemblerImpl.java
@@ -26,6 +26,7 @@ import org.apache.tapestry5.services.javascript.JavaScriptAggregationStrategy;
 import org.apache.tapestry5.services.javascript.ModuleManager;
 
 import java.io.*;
+import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -51,7 +52,7 @@ public class JavaScriptStackAssemblerImpl implements JavaScriptStackAssembler
 
     private final boolean minificationEnabled;
 
-    private final Map<String, StreamableResource> cache = CollectionFactory.newCaseInsensitiveMap();
+    private final Map<String, StreamableResource> cache = Collections.synchronizedMap(CollectionFactory.newCaseInsensitiveMap());
 
     private class Parameters
     {


Mime
View raw message