[
https://issues.apache.org/jira/browse/THRIFT-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670190#action_12670190
]
Bryan Duxbury commented on THRIFT-303:
--------------------------------------
Do users of the standard java generator need the ability to set the __isset
value for a field? The original intent of __isset was to say whether the value
was present when read off the wire, but it also is the only way to avoid
serializing "unset" primitive fields when using the standard generator. I can
generate "setMyFieldIsSet(bool)" methods for each field, but I'd like to avoid
it if possible.
> Changes to __isset interface
> ----------------------------
>
> Key: THRIFT-303
> URL: https://issues.apache.org/jira/browse/THRIFT-303
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java), Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.1
>
>
> I think that it would make a lot of sense for us to redefine the __isset
> interface of Java generated structs. With the changes in THRIFT-297, all
> TBase objects will now have the isSet generic method as well as isMyFieldSet
> per-field isset checkers. This gives the same kind of information as direct
> access to __isset as the public field does, but has the added advantage of
> hiding the information behind a method-based interface, freeing us to do
> things like THRIFT-115 and THRIFT-116 without breaking future clients.
> Especially with the future proposition of making a release, now would be a
> great time to improve this interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.