From 32581e7d1794506a1aff5f60ea78286a0d707cae Mon Sep 17 00:00:00 2001 From: remm Date: Fri, 1 Sep 2006 14:20:48 +0000 Subject: [PATCH] - Since I was looking at the class ... use more modern collections. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@439332 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/compiler/JspRuntimeContext.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/jasper/compiler/JspRuntimeContext.java b/java/org/apache/jasper/compiler/JspRuntimeContext.java index 9b9436c0f..5df34dd64 100644 --- a/java/org/apache/jasper/compiler/JspRuntimeContext.java +++ b/java/org/apache/jasper/compiler/JspRuntimeContext.java @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import javax.servlet.ServletContext; import javax.servlet.jsp.JspFactory; @@ -148,7 +149,7 @@ public final class JspRuntimeContext implements Runnable { /** * Maps JSP pages to their JspServletWrapper's */ - private Map jsps = Collections.synchronizedMap( new HashMap()); + private Map jsps = new ConcurrentHashMap(); /** @@ -177,8 +178,7 @@ public final class JspRuntimeContext implements Runnable { * @param jsw Servlet wrapper for JSP */ public void addWrapper(String jspUri, JspServletWrapper jsw) { - jsps.remove(jspUri); - jsps.put(jspUri,jsw); + jsps.put(jspUri, jsw); } /** @@ -188,7 +188,7 @@ public final class JspRuntimeContext implements Runnable { * @return JspServletWrapper for JSP */ public JspServletWrapper getWrapper(String jspUri) { - return (JspServletWrapper) jsps.get(jspUri); + return jsps.get(jspUri); } /** -- 2.11.0