You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Piotr Kozikowski (JIRA)" <ji...@apache.org> on 2011/06/08 00:24:58 UTC

[jira] [Updated] (THRIFT-1199) Union structs should have generated methods to test whether a specific field is currently set

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

Piotr Kozikowski updated THRIFT-1199:
-------------------------------------

    Attachment: thrift-1199.patch

This should do it.

> Union structs should have generated methods to test whether a specific field is currently set 
> ----------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1199
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1199
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Compiler
>            Reporter: Piotr Kozikowski
>            Assignee: Piotr Kozikowski
>            Priority: Trivial
>         Attachments: thrift-1199.patch
>
>
> For example, in the following union 
> {code}
> union MyUnion {
>   1: string my_field1;
>   2: string my_field2;
> }
> {code}
> it would be nice to be able to do something like {{boolean test = myUnion.is_my_field1;}} as an alternative to {{boolean test = (myUnion.getSetField() == _Fields.MY_FIELD1);}}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira