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

Java ignores default value(s) for unions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Java - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Given the following IDL, the expectation is that the generated code should initialize the one field with the default value accordingly. This is not the case, the value is silently ignored.

      union TestCase {
        1: string one 
        2: string two = "I am your friendly default"
        3: string three
      }
      

        Attachments

        1. 0001-Thrift-1775.patch
          2 kB
          Kamil Sałaś

          Activity

            People

            • Assignee:
              keppetto Kamil Sałaś
              Reporter:
              jensg Jens Geyer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: