You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2017/12/08 22:11:00 UTC

[jira] [Reopened] (VELOCITY-811) Concurrency problems with rendering macros

     [ https://issues.apache.org/jira/browse/VELOCITY-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov reopened VELOCITY-811:
-------------------------------------

> 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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org