Author: kkolinko
Date: Sat Jan  8 22:46:02 2011
New Revision: 1056828

URL: http://svn.apache.org/viewvc?rev=1056828&view=rev
Log:
Followup to r1055975
Move string calculation out of synchronized block

Modified:
    tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java?rev=1056828&r1=1056827&r2=1056828&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java 
(original)
+++ tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java Sat Jan  
8 22:46:02 2011
@@ -1693,15 +1693,17 @@ public class ProxyDirContext implements 
     protected boolean cacheUnload(String name) {
         if (cache == null)
             return false;
+        // To ensure correct operation, particularly of WebDAV, unload
+        // the resource with and without a trailing /
+        String name2;
+        if (name.endsWith("/")) {
+            name2 = name.substring(0, name.length() -1);
+        } else {
+            name2 = name + "/";
+        }
         synchronized (cache) {
             boolean result = cache.unload(name);
-            // To ensure correct operation, particularly of WebDAV, unload
-            // the resource with and without a trailing /
-            if (name.endsWith("/")) {
-                cache.unload(name.substring(0, name.length() -1));
-            } else {
-                cache.unload(name + "/");
-            }
+            cache.unload(name2);
             return result;
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to