Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.2
-
None
Description
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.
Attachments
Issue Links
- is duplicated by
-
THRIFT-3674 Java generated deep copy is shallow
- Closed
- supercedes
-
THRIFT-4380 Compiler incorrect generates code which treats a Java enum as a binary type
- Closed
- links to