THRIFT-624. java: compareTo is broken for Unions with binary fields
This patch adds a special case for byte[] values in TUnion. It also fixes a related bug in TBaseHelper for comparing two byte arrays.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835065 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift
index 48df1fc..5b2f672 100644
--- a/test/DebugProtoTest.thrift
+++ b/test/DebugProtoTest.thrift
@@ -263,6 +263,11 @@
5: i32 other_i32_field;
}
+union ComparableUnion {
+ 1: string string_field;
+ 2: binary binary_field;
+}
+
struct StructWithAUnion {
1: TestUnion test_union;
}