You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Sautter (JIRA)" <ji...@apache.org> on 2015/10/07 11:44:27 UTC

[jira] [Created] (THRIFT-3368) Setting fields in structs via prototype

David Sautter created THRIFT-3368:
-------------------------------------

             Summary: Setting fields in structs via prototype
                 Key: THRIFT-3368
                 URL: https://issues.apache.org/jira/browse/THRIFT-3368
             Project: Thrift
          Issue Type: Improvement
          Components: JavaScript - Compiler
    Affects Versions: 0.9.3
            Reporter: David Sautter
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)