[
https://issues.apache.org/jira/browse/THRIFT-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625528#action_12625528
]
Nathan Marz commented on THRIFT-119:
------------------------------------
I think the key here is that we only skip *optional* nulls. Obviously, we
always want to see the value of every required field. We don't lose any
information by not printing out the optional non-set fields - if it's not
printed in the list, then the application developer knows that value was not
set. I would propose that we don't overload toString at all and make *not*
printing optional nulls the only behavior - this will avoid the complexity of
maintaining a function that needs to deal with so many special cases (aka,
lists, maps, sets, and whatever data structures are added in the future).
> 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.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.