[
https://issues.apache.org/jira/browse/THRIFT-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505997#comment-13505997
]
Nathan Beyer commented on THRIFT-1699:
--------------------------------------
{quote}Kevin Radloff added a comment - 28/Nov/12 15:39
If you are counting the instances of read_field_begin and read_field_end, then
yes, they match up right now, but this is a union and not a standard struct,
and the behavior is unique here.{quote}
I'm intimately familiar with the uniqueness of unions, can you point me at some
doc or another language's library that's doing it correctly?
{quote}Kevin Radloff added a comment - 28/Nov/12 15:39
And unfortunately, I have not had much luck running the thrift ruby test suite.
It appears as though this has gone undiscovered because there are no tests that
use unions. And no users probably use unions, either. {quote}
This was going to be my next comment. Assuming the code needs to change, the
patch needs to include some test cases.
> Native Union#read has extra read_field_end call
> -----------------------------------------------
>
> Key: THRIFT-1699
> URL: https://issues.apache.org/jira/browse/THRIFT-1699
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Affects Versions: 0.8
> Reporter: Kevin Radloff
> Attachments: struct.diff
>
>
> The native implementation of the Union#read method has an extraneous call to
> read_field_end. This makes no difference to most protocols because
> read_field_end is a no-op, but it breaks JSON (in this case my own class, not
> the one in trunk), which does do something in this method.
--
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