thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King III (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-2315) Defaults applied to service method arguments not working as expected
Date Thu, 03 Jan 2019 14:01:00 GMT

     [ 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)

Mime
View raw message