[
https://issues.apache.org/jira/browse/THRIFT-1518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214028#comment-13214028
]
Hudson commented on THRIFT-1518:
--------------------------------
Integrated in Thrift #411 (See [https://builds.apache.org/job/Thrift/411/])
THRIFT-1518. cpp: Generated C++ code only sends the first optional field in
the write() function for a struct
There was some incorrect else if logic added to the CPP generated code, which
this patch replaces with the proper functionality.
Patch: Thomas Wiggins (Revision 1292508)
Result = FAILURE
bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1292508
Files :
* /thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
> Generated C++ code only sends the first optional field in the write()
> function for a struct.
> --------------------------------------------------------------------------------------------
>
> Key: THRIFT-1518
> URL: https://issues.apache.org/jira/browse/THRIFT-1518
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Compiler
> Affects Versions: 0.9
> Reporter: Chris Stylianou
> Assignee: Thomas Wiggins
> Fix For: 0.9
>
> Attachments: THRIFT-1518_fix.patch
>
>
> The generated C++ code for a struct will only write the first optional field
> that is set before moving on to writing the required fields, instead it
> should be checking and writing all of the optional fields if they have been
> set. Looking at the generated code it is doing "if-else" tests for writing
> each optional field, this limits it to only writing the first optional field
> it comes across and should be easily fixed by replacing it with "if" checks
> instead.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira