[ 
https://issues.apache.org/jira/browse/THRIFT-3759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-3759.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 0.10.0

Committed.

> required fields that are nil are silently ignored on write
> ----------------------------------------------------------
>
>                 Key: THRIFT-3759
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3759
>             Project: Thrift
>          Issue Type: Bug
>          Components: Delphi - Library
>    Affects Versions: 0.9.3
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Critical
>             Fix For: 0.10.0
>
>         Attachments: 
> THRIFT-3759-required-fields-that-are-nil-are-silentl.patch
>
>
> The Delphi code generated for {{required}} fields silently ignores {{nil}} 
> values, because {{nil}} values cannot be written. Consequently, the data 
> stored this way cannot be read later on because of the missing members.
> {code}
> struct foo {
>    // leaving this member nil will ignore the field on write
>    // and thus make the data unreadable
>    1 : required foo  try_to_leave_me_nil   
> }
> {code}
> The expected behaviour would be to throw an exception when the code is about 
> to write required, but unset data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to