[jira] Created: (VELOCITY-712) Velocity Context clone() method doesn't do a deep cloning as mentioned

View: New views
4 Messages — Rating Filter:   Alert me  

[jira] Created: (VELOCITY-712) Velocity Context clone() method doesn't do a deep cloning as mentioned

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Velocity Context clone() method doesn't do a deep cloning as mentioned
----------------------------------------------------------------------

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


[jira] Updated: (VELOCITY-712) Velocity Context clone() method doesn't do a deep cloning as mentioned

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Vincent Massol updated VELOCITY-712:
------------------------------------

    Description:
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.


  was:
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.



> Velocity Context clone() method doesn't do a deep cloning as mentioned
> ----------------------------------------------------------------------
>
>                 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@...
For additional commands, e-mail: dev-help@...


[jira] Updated: (VELOCITY-712) Velocity Context clone() method doesn't do a deep cloning as mentioned in the javadoc

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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


[jira] Updated: (VELOCITY-712) Velocity Context clone() method doesn't do a deep cloning as mentioned in the javadoc

by Velocity - Dev mailing list-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Vincent Massol updated VELOCITY-712:
------------------------------------

    Description:
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.


  was:
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.



> 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}
> new HashMap() 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@...
For additional commands, e-mail: dev-help@...