THRIFT-4177 fix java deep copy
Client: Java
Java compiler produces deep copy constructor that could make shallow copy accidentally.
This closes #1254
diff --git a/test/JavaDeepCopyTest.thrift b/test/JavaDeepCopyTest.thrift
new file mode 100644
index 0000000..fc974ae
--- /dev/null
+++ b/test/JavaDeepCopyTest.thrift
@@ -0,0 +1,19 @@
+include "JavaTypes.thrift"
+
+namespace java thrift.test
+
+struct DeepCopyFoo {
+ 1: optional list<DeepCopyBar> l,
+ 2: optional set<DeepCopyBar> s,
+ 3: optional map<string, DeepCopyBar> m,
+ 4: optional list<JavaTypes.Object> li,
+ 5: optional set<JavaTypes.Object> si,
+ 6: optional map<string, JavaTypes.Object> mi,
+ 7: optional DeepCopyBar bar,
+}
+
+struct DeepCopyBar {
+ 1: optional string a,
+ 2: optional i32 b,
+ 3: optional bool c,
+}