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:47:26 UTC
[jira] [Updated] (THRIFT-3368) Setting fields in structs via
prototype
[ https://issues.apache.org/jira/browse/THRIFT-3368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Sautter updated THRIFT-3368:
----------------------------------
Attachment: Enables_setting_required_struct-properties_by_prototype__Disables_initialization_with_null.patch
> 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
> Labels: features
> Attachments: Enables_setting_required_struct-properties_by_prototype__Disables_initialization_with_null.patch
>
>
> 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)