You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mark Slee (JIRA)" <ji...@apache.org> on 2008/09/23 00:51:44 UTC
[jira] Commented: (THRIFT-119) Improved toString for Java Structs
[ https://issues.apache.org/jira/browse/THRIFT-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633546#action_12633546 ]
Mark Slee commented on THRIFT-119:
----------------------------------
I think this is a reasonable approach. As long as the issets are kept in sync (which they always should be) this will do well.
isset fields are always null. Just write this:
+ indent(out) << "if (__isset." << (*f_iter)->get_name() << " != false) {" << endl;
as this:
+ indent(out) << "if (__isset." << (*f_iter)->get_name() << ") {" << endl;
The "!= false" makes it harder to read, IMO.
> Improved toString for Java Structs
> ----------------------------------
>
> Key: THRIFT-119
> URL: https://issues.apache.org/jira/browse/THRIFT-119
> Project: Thrift
> Issue Type: Sub-task
> Components: Compiler (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Attachments: thrift-119-v2.patch, thrift-119.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.