geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashishj...@apache.org
Subject svn commit: r1036024 - /geronimo/server/branches/2.1/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/GeronimoTldLocationsCache.java
Date Wed, 17 Nov 2010 13:10:36 GMT
Author: ashishjain
Date: Wed Nov 17 13:10:36 2010
New Revision: 1036024

URL: http://svn.apache.org/viewvc?rev=1036024&view=rev
Log:
GERONIMO-5683 Avoid concurrent access to the scannedJars Arraylist. New patch as per kevan
and jarek comments.

Modified:
    geronimo/server/branches/2.1/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/GeronimoTldLocationsCache.java

Modified: geronimo/server/branches/2.1/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/GeronimoTldLocationsCache.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/GeronimoTldLocationsCache.java?rev=1036024&r1=1036023&r2=1036024&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/GeronimoTldLocationsCache.java
(original)
+++ geronimo/server/branches/2.1/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/GeronimoTldLocationsCache.java
Wed Nov 17 13:10:36 2010
@@ -211,7 +211,7 @@ public class GeronimoTldLocationsCache e
         return (String[]) mappings.get(uri);
     }
 
-    private void init() throws JasperException {
+    private synchronized void init() throws JasperException {
         if (initialized) return;
         try {
             processWebDotXml();
@@ -462,8 +462,6 @@ public class GeronimoTldLocationsCache e
             URL[] urls = ((URLClassLoader) loader).getURLs();
             for (int i=0; i<urls.length; i++) {
                 URLConnection conn = urls[i].openConnection();
-             // Avoid concurrent access to the scannedJars ArrayList and also potential duplication
-                synchronized (this) {
                 if (conn instanceof JarURLConnection) {
                     if (needScanJar(loader,
                                     ((JarURLConnection) conn).getJarFile().getName())) {
@@ -481,7 +479,6 @@ public class GeronimoTldLocationsCache e
                         scannedJars.add(urlStr);
                     }
                 }
-            }
           }
         }
     }



Mime
View raw message