[
https://issues.apache.org/jira/browse/VELOCITY-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed VELOCITY-811.
-----------------------------------
Resolution: Duplicate
> 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 was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]