[jira] [Created] (THRIFT-3868) Java struct equals should do identity check before field comparison
Mike Rettig created THRIFT-3868: --- Summary: Java struct equals should do identity check before field comparison Key: THRIFT-3868 URL: https://issues.apache.org/jira/browse/THRIFT-3868 Project: Thrift Issue Type: Improvement Components: Java - Compiler Affects Versions: 0.9.3, 0.10.0 Reporter: Mike Rettig Priority: Minor The identity check is cheap and should be done before comparing fields of a struct. Idiomatic equals methods always include this check especially if the field by field comparison can be expensive. Check to add: if(that == this) return true; 1864 out << indent() << "public boolean equals(" << tstruct->get_name() << " that) {" << endl; 1865 indent_up(); 1866 out << indent() << "if (that == null)" << endl << indent() << " return false;" << endl; INSERT IDENTITY CHECK HERE 1867 1868 const vector& members = tstruct->get_members(); 1869 vector ::const_iterator m_iter; 1870 for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { 1871 out << endl; 1872 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Issue Comment Deleted] (THRIFT-3867) Specify BinaryProtocol and CompactProtocol
[ https://issues.apache.org/jira/browse/THRIFT-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erik van Oosten updated THRIFT-3867: Comment: was deleted (was: Pull request in https://github.com/apache/thrift/pull/1036.) > Specify BinaryProtocol and CompactProtocol > -- > > Key: THRIFT-3867 > URL: https://issues.apache.org/jira/browse/THRIFT-3867 > Project: Thrift > Issue Type: Documentation > Components: Documentation >Reporter: Erik van Oosten > > It would be nice when the protocol(s) would be specified somewhere. This > should improve communication between developers, but also opens the way for > alternative implementations so that Thrift can thrive even better. > I have a fairly complete description of the BinaryProtocol and > CompactProtocol which I will submit as a patch for further review and > discussion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3867) Specify BinaryProtocol and CompactProtocol
[ https://issues.apache.org/jira/browse/THRIFT-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15355043#comment-15355043 ] Erik van Oosten commented on THRIFT-3867: - Pull request in https://github.com/apache/thrift/pull/1036. > Specify BinaryProtocol and CompactProtocol > -- > > Key: THRIFT-3867 > URL: https://issues.apache.org/jira/browse/THRIFT-3867 > Project: Thrift > Issue Type: Documentation > Components: Documentation >Reporter: Erik van Oosten > > It would be nice when the protocol(s) would be specified somewhere. This > should improve communication between developers, but also opens the way for > alternative implementations so that Thrift can thrive even better. > I have a fairly complete description of the BinaryProtocol and > CompactProtocol which I will submit as a patch for further review and > discussion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3867) Specify BinaryProtocol and CompactProtocol
[ https://issues.apache.org/jira/browse/THRIFT-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15355042#comment-15355042 ] ASF GitHub Bot commented on THRIFT-3867: GitHub user erikvanoosten opened a pull request: https://github.com/apache/thrift/pull/1036 THRIFT-3867 Specify BinaryProtocol and CompactProtocol First version of a specification of the binary protocol and compact protocol. Please review and comment. You can merge this pull request into a Git repository by running: $ git pull https://github.com/erikvanoosten/thrift THRIFT-3867 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1036.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1036 commit c6cb4d14a0c915001f4eb46e8e8fd822b9355e51 Author: Erik van OostenDate: 2016-06-29T11:24:00Z THRIFT-3867 first version of a specification of the binary protocol and compact protocol. > Specify BinaryProtocol and CompactProtocol > -- > > Key: THRIFT-3867 > URL: https://issues.apache.org/jira/browse/THRIFT-3867 > Project: Thrift > Issue Type: Documentation > Components: Documentation >Reporter: Erik van Oosten > > It would be nice when the protocol(s) would be specified somewhere. This > should improve communication between developers, but also opens the way for > alternative implementations so that Thrift can thrive even better. > I have a fairly complete description of the BinaryProtocol and > CompactProtocol which I will submit as a patch for further review and > discussion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] thrift pull request #1036: THRIFT-3867 Specify BinaryProtocol and CompactPro...
GitHub user erikvanoosten opened a pull request: https://github.com/apache/thrift/pull/1036 THRIFT-3867 Specify BinaryProtocol and CompactProtocol First version of a specification of the binary protocol and compact protocol. Please review and comment. You can merge this pull request into a Git repository by running: $ git pull https://github.com/erikvanoosten/thrift THRIFT-3867 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1036.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1036 commit c6cb4d14a0c915001f4eb46e8e8fd822b9355e51 Author: Erik van OostenDate: 2016-06-29T11:24:00Z THRIFT-3867 first version of a specification of the binary protocol and compact protocol. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Created] (THRIFT-3866) HTML generator should use namespaces as folder names
Jens Geyer created THRIFT-3866: -- Summary: HTML generator should use namespaces as folder names Key: THRIFT-3866 URL: https://issues.apache.org/jira/browse/THRIFT-3866 Project: Thrift Issue Type: Bug Components: HTML - Compiler Reporter: Jens Geyer [~wilbeibi] wrote: {quote} So, what if thrift -r --gen html a.thrift ? There is no way to gent a.thrift and b.thrift generate documentation in the same index.html {quote} Confirmed. Does not work as one would expect, output is always put into the same dir. That's not cool. {code:title=ci.thrift} // CI container, call with thrift -r -gen ... namespace * ci #include a.thrift #include b.thrift {code} {code:title=a.thrift} namespace * Foo struct Foo { 1 : i32 foo } {code} {code:title=b.thrift} namespace * Bar struct Bar { 1 : i32 Bar } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)