Erik van Oosten created THRIFT-1836:
---------------------------------------
Summary: 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
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