You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III (JIRA)" <ji...@apache.org> on 2017/12/14 13:56:18 UTC

[jira] [Closed] (THRIFT-4177) Java compiler produces deep copy constructor that could make shallow copy instead

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

James E. King, III closed THRIFT-4177.
--------------------------------------

> 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
>    Affects Versions: 0.9.2
>            Reporter: Deniss Afonin
>            Assignee: James E. King, III
>             Fix For: 0.11.0
>
>
> 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.4.14#64029)