[ 
https://issues.apache.org/jira/browse/THRIFT-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13643234#comment-13643234
 ] 

Jens Geyer commented on THRIFT-1946:
------------------------------------

I'm not a Java guy, but what is the reason why Java needs isset bits for 
required fields? Shouldn't they always be set by definition, like e.g. with 
C++? 

                
> Non-optional field setters don't set __isset to true
> ----------------------------------------------------
>
>                 Key: THRIFT-1946
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1946
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>            Reporter: Vitali Lovich
>
> Optional fields __set_X modify the __isset structure for the object.  This is 
> not true of non-optional fields.  When the object is initialized, you have to 
> explicitly set the __isset field.  It would be nice if __set_X set __isset to 
> true for non-optional fields and optionally if __isset initialized to true 
> for non-optional fields.
> This causes a difference between C++ & Java code that handles isSetX for 
> non-optionals by just checking against null.

--
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

Reply via email to