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

required fields that are nil are silently ignored on write

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0
    • Component/s: Delphi - Library
    • Labels:
      None
    • Patch Info:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: