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

Can not send nil pointer as service method argument

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0
    • Component/s: Go - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      If you try to send a nil struct as an argument to a service method a panic occurs as it tries to write out all the fields in the struct, the python generated code has guarding 'if self.x != None:' for every struct field, whereas Go only outputs the 'if p.IsSet()' when the field is declared optional, which is not possible for argument lists.

        Attachments

          Activity

            People

            • Assignee:
              Zariel Chris Bannister
              Reporter:
              Zariel Chris Bannister
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: