You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Vincent Massol (JIRA)" <de...@velocity.apache.org> on 2009/09/04 13:17:57 UTC
[jira] Updated: (VELOCITY-712) Velocity Context clone() method
doesn't do a deep cloning as mentioned in the javadoc
[ https://issues.apache.org/jira/browse/VELOCITY-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent Massol updated VELOCITY-712:
------------------------------------
Summary: Velocity Context clone() method doesn't do a deep cloning as mentioned in the javadoc (was: Velocity Context clone() method doesn't do a deep cloning as mentioned)
> 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
>
> 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}
> newHashMap() will not perform deep cloning but only shallow cloning.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org