THRIFT-138. java: Create deep-copy constructors for Thrift structs
authorDavid Reiss <dreiss@apache.org>
Tue, 2 Dec 2008 02:06:31 +0000 (02:06 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 2 Dec 2008 02:06:31 +0000 (02:06 +0000)
commit603d50437cbe9c76be942f863f2db9526459fce2
treebdf10d0fdef2f8142d7b8eec5ad8e29d36ccec5e
parent04c315946c68034a51376bab368a4c4c2c8a8ba5
THRIFT-138. java: Create deep-copy constructors for Thrift structs

- Create a copy constructor for every Thrift struct.  The constructor
  performs a deep copy on the argument, resulting in no shared state.
- Make thrift structions implement Cloneable and implement .clone()
  using the copy constructor.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722332 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_java_generator.cc
test/java/build.xml
test/java/src/DeepCopyTest.java [new file with mode: 0644]