You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2016/03/24 23:22:25 UTC

[jira] [Created] (THRIFT-3759) required fields that are nil are silently ignored on write

Jens Geyer created THRIFT-3759:
----------------------------------

             Summary: 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
            Reporter: Jens Geyer
            Assignee: Jens Geyer
            Priority: Critical


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)