[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    [jira] Updated: (VELOCITY-712) Velocity Context clone() method
From:       Jarkko_Viinamäki_(JIRA) <dev () velocity ! apache ! org>
Date:       2010-04-15 17:03:56
Message-ID: 31623300.145071271351036703.JavaMail.jira () thor
[Download RAW message or body]


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic