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/01/09 14:38:39 UTC

[jira] [Commented] (THRIFT-3533) Can not send nil pointer as service method argument

    [ https://issues.apache.org/jira/browse/THRIFT-3533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090620#comment-15090620 ] 

Jens Geyer commented on THRIFT-3533:
------------------------------------

IIRC null pointers are not allowed by design in Thrift.

> Can not send nil pointer as service method argument
> ---------------------------------------------------
>
>                 Key: THRIFT-3533
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3533
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Chris Bannister
>
> 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.



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