Concurrency problems with rendering macros
------------------------------------------

                 Key: VELOCITY-811
                 URL: https://issues.apache.org/jira/browse/VELOCITY-811
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.7.x
         Environment: Oracle JVM 1.6.0_26-b03 on Ubuntu 11.04
            Reporter: Alex


When using a single instance of Velocity engine from multiple threads sometimes 
the macro invocation is rendered as literal (#macroName...) as opposed to 
rendering the macro itself.
I looked at source code and there is at least one problem with the 
implementation of  VelocimacroManager.addNamespace. The code there is "strange" 
from the multi-threading point of view and puts an empty namespace into the 
ConcurrentHashMap before restoring it back. It should probably use 
"putIfAbsent" method instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to