You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King III (JIRA)" <ji...@apache.org> on 2019/01/03 14:01:00 UTC

[jira] [Updated] (THRIFT-2315) Defaults applied to service method arguments not working as expected

     [ https://issues.apache.org/jira/browse/THRIFT-2315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James E. King III updated THRIFT-2315:
--------------------------------------
    Fix Version/s:     (was: 1.0)

> Defaults applied to service method arguments not working as expected
> --------------------------------------------------------------------
>
>                 Key: THRIFT-2315
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2315
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>            Reporter: Jens Geyer
>            Priority: Major
>              Labels: default
>
> h3. Problem
> {code}
> service Foobar {
>   void Test( 1: i32 someValue = 42)
> }
> {code}
> The default of 42 is set into the Test_Args structure in most languages, but later overwritten because the generated calls do completely ignore these defaults. One has always to call:
> {code}
> client.Test( 1);
> client.Test( 42);
> client.Test( 4711);
> {code}
> instead of
> {code}
> client.Test( 1);
> client.Test( );  // 42 is the default
> client.Test( 4711);
> {code}
> h3. Applies to
> Most (all?) languages.
> h3. Todo
> Create a sub-task for your particular language and add the patch. :-)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)