You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by vk...@apache.org on 2009/05/11 14:42:58 UTC
svn commit: r773543 -
/portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
Author: vkumar
Date: Mon May 11 12:42:58 2009
New Revision: 773543
URL: http://svn.apache.org/viewvc?rev=773543&view=rev
Log:
Making path cache as synchronized for handling concurrency issue
https://issues.apache.org/jira/browse/JS2-1001
Modified:
portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java?rev=773543&r1=773542&r2=773543&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java Mon May 11 12:42:58 2009
@@ -16,6 +16,7 @@
*/
package org.apache.jetspeed.decoration.caches;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -31,11 +32,11 @@
*/
public class HashMapPathResolverCache implements PathResolverCache
{
- protected Map cache;
+ protected Map<String,String> cache;
public HashMapPathResolverCache()
{
- this.cache = new HashMap();
+ this.cache = Collections.synchronizedMap(new HashMap<String,String>());
}
public void addPath(String key, String path)
@@ -45,12 +46,12 @@
public String getPath(String key)
{
- return (String) cache.get(key);
+ return cache.get(key);
}
public String removePath(String key)
{
- return (String) cache.remove(key);
+ return cache.remove(key);
}
public void clear()
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org