[
https://issues.apache.org/jira/browse/VELOCITY-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jarkko Viinamäki updated VELOCITY-712:
--------------------------------------
Attachment: velocity-712.patch
This patch just fixes the JavaDoc and doesn't change the code in any way.
> Velocity Context clone() method doesn't do a deep cloning as mentioned in the
> javadoc
> -------------------------------------------------------------------------------------
>
> Key: VELOCITY-712
> URL: https://issues.apache.org/jira/browse/VELOCITY-712
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6.1
> Reporter: Vincent Massol
> Attachments: velocity-712.patch
>
>
> Looking at the code it does:
> {noformat}
> public Object clone()
> {
> VelocityContext clone = null;
> try
> {
> clone = (VelocityContext) super.clone();
> clone.context = new HashMap(context);
> }
> catch (CloneNotSupportedException ignored)
> {
> }
> return clone;
> }
> {noformat}
> new HashMap() will not perform deep cloning but only shallow cloning.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
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]