velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r992115 - /velocity/engine/trunk/src/java/org/apache/velocity/runtime/VelocimacroManager.java
Date Thu, 02 Sep 2010 21:00:10 GMT
Author: nbubna
Date: Thu Sep  2 21:00:10 2010
New Revision: 992115

URL: http://svn.apache.org/viewvc?rev=992115&view=rev
Log:
minor performance tweak

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/VelocimacroManager.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/VelocimacroManager.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/VelocimacroManager.java?rev=992115&r1=992114&r2=992115&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/VelocimacroManager.java (original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/VelocimacroManager.java Thu
Sep  2 21:00:10 2010
@@ -259,9 +259,9 @@ public class VelocimacroManager
      */
     public boolean dumpNamespace(final String namespace)
     {
-        synchronized(this)
+        if (usingNamespaces(namespace))
         {
-            if (usingNamespaces(namespace))
+            synchronized(this)
             {
                 Map h = (Map) namespaceHash.remove(namespace);
 
@@ -274,9 +274,8 @@ public class VelocimacroManager
 
                 return true;
             }
-
-            return false;
         }
+        return false;
     }
 
     /**



Mime
View raw message