[ 
https://issues.apache.org/jira/browse/THRIFT-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973067#comment-15973067
 ] 

James E. King, III commented on THRIFT-4177:
--------------------------------------------

Hi, I misread the meaning of the title.  I assumed you were saying we didn't 
need deep copy in the title text.
It looks like this is a duplicate of THRIFT-3674; or we can make THRIFT-3674 a 
duplicate of this since this has a PR now.  Thoughts?

> Java compiler produces deep copy constructor that could make shallow copy 
> instead
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-4177
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4177
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Compiler
>            Reporter: Deniss Afonin
>
> Java compiler produces deep copy constructor that makes shallow copies for 
> referenced objects from collections when they are defined after the root 
> object in the thrift file.
> For example, consider following thrift file:
> struct Foo {
> 1: optional list<Bar> bars,
> }
> struct Bar {
> 1: optional string value,
> }
> new Foo().deepCopy() will produce a copy of Foo with a copy of a list that 
> reference the same Bar object.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to