[
https://issues.apache.org/jira/browse/THRIFT-1836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558631#comment-13558631
]
Erik van Oosten commented on THRIFT-1836:
-----------------------------------------
Some comments on the patch:
* I was not able to build the code (even before my changes).
* I was not able to find tests that could be updated.
* This was my first cpp code in 14 years.
Please see the patch as a starting point, and not as working code.
> Java compiler does not generate constructor with all fields
> -----------------------------------------------------------
>
> Key: THRIFT-1836
> URL: https://issues.apache.org/jira/browse/THRIFT-1836
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.9
> Reporter: Erik van Oosten
> Attachments: thrift-1836-additional-java-constructor.patch
>
>
> The java compiler does not generate a constructor with all fields when some
> fields are required and some are optional. It only generates a constructor
> with all required fields, or a constructor with all fields when all fields
> are optional.
> Rationale: We currently do not specify the requiredness of any field (making
> them optional). If we change some of the fields to required, we also have to
> rewrite so much code that is no longer practical.
> The attached patch will generate 3 constructors instead of 2:
> - the default constructor
> - a constructor with all required fields
> - a constructor with all fields (added by this patch)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira