Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.3, 0.10.0
-
None
Description
When compiling th following thrift code:
struct Customer { 1: required i32 customer_id, 2: required list<Order> orders } struct Order { 1: required i32 order_id, }
compiler generates meta data for orders field as FieldValueMetaData:
tmpMap.put(_Fields.ORDERS, new org.apache.thrift.meta_data.FieldMetaData("orders", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "Order"))));
If structs order is reversed:
struct Order { 1: required i32 order_id, } struct Customer { 1: required i32 customer_id, 2: required list<Order> orders }
compiler generates meta data for orders field as StructMetaData:
tmpMap.put(_Fields.ORDERS, new org.apache.thrift.meta_data.FieldMetaData("orders", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Order.class))));
Attachments
Issue Links
- links to