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

David Reiss commented on THRIFT-116:
------------------------------------

I see a lot of places in the generator where you do something like
{code}
if (type_can_be_null(ftype)) {
  out << field_name << "!= null";
} else {
  out << "__isset." << field_name;
}
{code}

Is there a reason you don't use isSetField more?

> Isset fields for non-primitive types unnecessary
> ------------------------------------------------
>
>                 Key: THRIFT-116
>                 URL: https://issues.apache.org/jira/browse/THRIFT-116
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: Compiler (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: thrift-116.patch
>
>
> For fields that aren't primitives, the Isset structure doesn't need to 
> contain flags for those fields. This is because it is easy to detect whether 
> it was set or not just by checking whether the field's value is null. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to