Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2246

Unset enum value is printed by ToString()

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      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: )"

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              taphos Filipp Keks

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment