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 2013/11/01 22:25:18 UTC

[jira] [Comment Edited] (THRIFT-2246) Unset enum value is printed by ToString()

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

Jens Geyer edited comment on THRIFT-2246 at 11/1/13 9:25 PM:
-------------------------------------------------------------

[~taphos]: any comments on the C# part of the patch?


was (Author: jensg):
@Filipp Keks: any comments on the C# part of the patch?

> Unset enum value is printed by ToString()
> -----------------------------------------
>
>                 Key: THRIFT-2246
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2246
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Compiler, Delphi - Compiler
>    Affects Versions: 0.9.1
>            Reporter: Filipp Keks
>            Assignee: Jens Geyer
>            Priority: Minor
>             Fix For: 0.9.2
>
>         Attachments: THRIFT-2246_Unset_enum_value_is_printed_by_ToString.patch
>
>
> if enum is not set, ToString() returns a first enum value, but it should indicate that field is empty
> enum Distance
> {
>     DISTANCE_1      = 0,
>     DISTANCE_2      = 1,
> }
> struct RaceDetails {
>    1: optional Distance distance,
> }
> c#:
> new RaceDetails().ToString() 
> result: "RaceDetails(Distance:DISTANCE_1)"
> expected: "RaceDetails(Distance: )"



--
This message was sent by Atlassian JIRA
(v6.1#6144)