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

Setting fields in structs via prototype

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.9.3
    • None
    • JavaScript - Compiler
    • Patch Available
    • Patch

    Description

      If you have a struct and you want to set some fields by prototype (e.g. like a default, that depends on a certain application-state), Thrift does not allow this, because all fields will be "initialized" with null.
      Since I see no requirement to do so and the prototype of such a struct is defined, but always empty, I changed the Thrift-JS-Compiler to stop initializing fields with null and enabling the setting of fields via prototype.

      Attachments

        Activity

          People

            Unassigned Unassigned
            davidsautter David Sautter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: