You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Simon South (JIRA)" <ji...@apache.org> on 2016/11/18 22:01:00 UTC
[jira] [Updated] (THRIFT-3968) Deserializing empty string
[ https://issues.apache.org/jira/browse/THRIFT-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon South updated THRIFT-3968:
--------------------------------
Attachment: 1-thrift-3968-deserialize-empty-string.patch
0-thrift-3968-add-test-cases.patch
I've attached a pair of patches that add suitable test cases and fix the behaviour of the two protocols the implementation supports, binary and compact.
[~matejkupljen], if you have a chance, please apply these patches and let me know if this resolves the issue.
[~cjmay], could you give these a second look please to make sure the changes are appropriate?
> Deserializing empty string
> --------------------------
>
> Key: THRIFT-3968
> URL: https://issues.apache.org/jira/browse/THRIFT-3968
> Project: Thrift
> Issue Type: Bug
> Components: C glib - Compiler, C glib - Library
> Affects Versions: 0.9.3, 1.0
> Reporter: Matej Kupljen
> Assignee: Simon South
> Attachments: 0-thrift-3968-add-test-cases.patch, 1-thrift-3968-deserialize-empty-string.patch
>
>
> If we use a string inside struct definition and set the value to "" (empty string, not NULL) when de-serializing it we get set it NULL and and the same time the __isset field for this value is set to TRUE which is think is not correct.
> Either we fix the library to return an empty string, or fix the compiler to set the __isset filed to FALSE.
> What would be the best way to solve this?
> Please, let me know if you need any more information.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)