[ https://issues.apache.org/jira/browse/THRIFT-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer updated THRIFT-1835: ------------------------------- Attachment: THRIFT-1835_Compiler_should_fail_when_duplicate_field_names_are_present.patch Proposed patch > Compiler should fail when duplicate field names are present > ----------------------------------------------------------- > > Key: THRIFT-1835 > URL: https://issues.apache.org/jira/browse/THRIFT-1835 > Project: Thrift > Issue Type: Bug > Components: Java - Compiler > Affects Versions: 0.9 > Reporter: Nicolas Trésegnie > Attachments: Test Thrift-1835 duplicate fields.thrift, > THRIFT-1835_Compiler_should_fail_when_duplicate_field_names_are_present.patch > > > Thrift accept structs with a duplicate field name if the IDs are different. > However, the generated java code does not compile. > {code} > struct duplicate { > 1: i32 field, > 2: i32 field > } > {code} > {code} > private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = ... > private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = ... > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira