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

Java ignores default value(s) for unions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Java - Compiler
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: