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/11 20:15:51 UTC

[jira] [Commented] (THRIFT-1964) 'Isset' causes problems with C#/.NET serializers

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

Jens Geyer commented on THRIFT-1964:
------------------------------------

Tested with Mono, found minor problem without the "serialize" switch, updated patch follows.

Noteworthy is the fact, that [ShouldSerialize*()-Pattern|https://bugzilla.xamarin.com/show_bug.cgi?id=1852] seem not supported with older mono versions. In that case, the isset-problem will raise its ugly head again, but other than that there is no runtime error whatsoever - the ShouldSerialize*() methods simply aren't called then. 

> 'Isset' causes problems with C#/.NET serializers
> ------------------------------------------------
>
>                 Key: THRIFT-1964
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1964
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Compiler
>    Affects Versions: 0.9, 0.9.1
>            Reporter: xq.gzh
>            Assignee: Jens Geyer
>              Labels: Isset, serializers
>             Fix For: 0.9.2
>
>         Attachments: 1964-v2.patch, 1964.patch, ReproduceTheIssue.zip, THRIFT-1964-serializer-vs-isset.patch, a.thrift, fix_Isset_xmlserializer.patch, fix_isset_problem_test.zip, modified-testcase.zip
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> same class name 'Isset' in user defined class will cause xmlserializer crashed. 
> below is the sample thrift:  
> struct A {
>  1: string x;
> }
> struct B {
>  1: string y;
> }
> struct C {
>  1:A a
>  2:B b
> }
> generate code and try xmlserialize instance of class C. it crashed.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)