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

Bryan Duxbury commented on THRIFT-33:
-------------------------------------

Does this mean that we should just use the javabean generator if we want to 
avoid serializing primitives? That is, do we want the standard Java generated 
code NOT to be sparse with primitive types? This may just be a documentation 
issue at root, but still, I find it confusing what I get out of the box with 
the java vs javabean generator.

> Unset fields will still be serialized if they are primitives
> ------------------------------------------------------------
>
>                 Key: THRIFT-33
>                 URL: https://issues.apache.org/jira/browse/THRIFT-33
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>
> Since primitive types (int, bool, byte, etc.) cannot be null in Java, the 
> Java libraries will serialize "empty" values into their output. This is very 
> bad when you have sparse Thrift structs with many possible fields and only 
> one actually used. 
> The Isset logic appears to be partially implemented, but is apparently 
> unused. It seems like the required action is using getters and setters and 
> honoring the isset information appropriately.

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