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 2014/01/14 23:15:22 UTC

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

Jens Geyer created THRIFT-2315:
----------------------------------

             Summary: 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


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
(v6.1.5#6160)