tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r439332 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
Date Fri, 01 Sep 2006 14:20:48 GMT
Author: remm
Date: Fri Sep  1 07:20:48 2006
New Revision: 439332

URL: http://svn.apache.org/viewvc?rev=439332&view=rev
Log:
- Since I was looking at the class ... use more modern collections.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java?rev=439332&r1=439331&r2=439332&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java Fri Sep  1
07:20:48 2006
@@ -29,6 +29,7 @@
 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 @@
     /**
      * Maps JSP pages to their JspServletWrapper's
      */
-    private Map jsps = Collections.synchronizedMap( new HashMap());
+    private Map<String, JspServletWrapper> jsps = new ConcurrentHashMap<String,
JspServletWrapper>();
  
 
     /**
@@ -177,8 +178,7 @@
      * @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 @@
      * @return JspServletWrapper for JSP
      */
     public JspServletWrapper getWrapper(String jspUri) {
-        return (JspServletWrapper) jsps.get(jspUri);
+        return jsps.get(jspUri);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message