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/04 22:40:19 UTC
[jira] [Resolved] (THRIFT-2246) Unset enum value is printed by
ToString()
[ https://issues.apache.org/jira/browse/THRIFT-2246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer resolved THRIFT-2246.
--------------------------------
Resolution: Fixed
Committed, assuming lazy consensus.
> 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)