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

ASF GitHub Bot commented on THRIFT-4177:
----------------------------------------

GitHub user afds opened a pull request:

    https://github.com/apache/thrift/pull/1254

    THRIFT-4177 fix java deep copy

    Java compiler produces deep copy constructor that could make shallow copy 
instead.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/afds/thrift THRIFT-4177

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1254.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1254
    
----
commit b4c56d19504f705a02df2ddd68680017e45979f1
Author: Deniss Afonin <deniss.afo...@creative-mobile.com>
Date:   2017-04-18T16:27:49Z

    THRIFT-4177 fix java deep copy
    
    Java compiler produces deep copy constructor that could make shallow copy 
instead.

----


> 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