Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3759

required fields that are nil are silently ignored on write

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.9.3
    • 0.10.0
    • Delphi - Library
    • None
    • Patch Available

    Description

      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.

      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   
      }
      

      The expected behaviour would be to throw an exception when the code is about to write required, but unset data.

      Attachments

        Activity

          People

            jensg Jens Geyer
            jensg Jens Geyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: