[ https://issues.apache.org/jira/browse/THRIFT-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14013905#comment-14013905 ]
Hudson commented on THRIFT-2554: -------------------------------- SUCCESS: Integrated in Thrift #1168 (See [https://builds.apache.org/job/Thrift/1168/]) THRIFT-2554 double initialization in generated Read() method (jensg: rev 5588a569d5a08c23dca8d770dfe87892f950deb8) * compiler/cpp/src/generate/t_csharp_generator.cc > double initialization in generated Read() method > ------------------------------------------------ > > Key: THRIFT-2554 > URL: https://issues.apache.org/jira/browse/THRIFT-2554 > Project: Thrift > Issue Type: Bug > Components: C# - Compiler > Reporter: Jens Geyer > Assignee: Jens Geyer > Priority: Minor > Fix For: 0.9.2 > > Attachments: > THRIFT-2544_double_initialization_in_generated_Read_method.patch, > thrift-2554-double-init-testcase.thrift > > > {code:title=IDL} > struct Element { > 1: string foobar > } > struct Test { > 1: list<Element> elms > } > {code} > produces this code: > {code:title=Test.cs} > public partial class Test : TBase > { > //... stuff ... > public void Read (TProtocol iprot) > { > //... stuff ... > case 1: > if (field.Type == TType.List) { > { > Elms = new List<Element>(); > TList _list0 = iprot.ReadListBegin(); > for( int _i1 = 0; _i1 < _list0.Count; ++_i1) > { > Element _elem2 = new Element(); // <-- first instance > _elem2 = new Element(); // <-- second instance > _elem2.Read(iprot); > Elms.Add(_elem2); > } > iprot.ReadListEnd(); > } > //... more stuff ... > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)