[ 
https://issues.apache.org/jira/browse/THRIFT-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561026#comment-13561026
 ] 

Jens Geyer commented on THRIFT-1835:
------------------------------------

{quote} 1) Is it appropriate to put these (5) different possibilities of 
failure in the same test case? The compiler will throw an error when the struct 
will be parsed so the other cases will never be tested.  {quote} 

The intention was merely to have a test for each of them at hand. If these 
tests are to be included into an automated test, then yes, they will have to be 
separated.

{quote} different format {quote} 

Indeed. I guess it has something to do with the way how the compiler processes 
the IDL. Anyway, I'll check that.

                
> Compiler should fail when duplicate field names are present
> -----------------------------------------------------------
>
>                 Key: THRIFT-1835
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1835
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>    Affects Versions: 0.9
>            Reporter: Nicolas Trésegnie
>         Attachments: Test Thrift-1835 duplicate fields.thrift, 
> THRIFT-1835_Compiler_should_fail_when_duplicate_field_names_are_present.patch
>
>
> Thrift accept structs with a duplicate field name if the IDs are different. 
> However, the generated java code does not compile.
> {code}
> struct duplicate {
>     1: i32 field,
>     2: i32 field
> }
> {code}
> {code}
> private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = ...
> private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = ...
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to