You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2010/02/28 06:20:05 UTC

[jira] Closed: (THRIFT-716) Field names can conflict with local variables in code for unions

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

Bryan Duxbury closed THRIFT-716.
--------------------------------

    Resolution: Fixed

I just committed this.

> Field names can conflict with local variables in code for unions
> ----------------------------------------------------------------
>
>                 Key: THRIFT-716
>                 URL: https://issues.apache.org/jira/browse/THRIFT-716
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Nathan Marz
>            Assignee: Bryan Duxbury
>         Attachments: thrift-716.patch
>
>
> Try creating a union with the field name "value", and the code won't compile. In writeFields for the generated class, you'll have something like the following:
> <code>
>       case VALUE:
>         String value = (String)getFieldValue();
>         oprot.writeString(value);
>         return;
> </code>
> "String value" conflicts with the parameter "Object value".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.