[
https://issues.apache.org/jira/browse/THRIFT-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785997#action_12785997
]
Jonathan Ellis commented on THRIFT-641:
---------------------------------------
It would be better to have both constructor-with-requred-params and
constructor-with-all-params, both to avoid screwing over projects using the
latter and because it is simply better style in many cases than forcing setter
use after construction.
> --gen java no longer generates constructors with all required and optional
> args.
> --------------------------------------------------------------------------------
>
> Key: THRIFT-641
> URL: https://issues.apache.org/jira/browse/THRIFT-641
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Java)
> Environment: Mac OS X,
> Reporter: Gary Dusbabek
> Priority: Minor
>
> --gen java only generates constructors that have the required members as
> parameters. In the past it would generate constructors that had all members,
> including optional members.
> E.g.:
> struct ColumnParent {
> 3: required string column_family,
> 4: optional binary super_column,
> }
> generates:
> public ColumnParent(String column_family)
> {
> this();
> this.column_family = column_family;
> }
> but historically generated:
> public ColumnParent(String column_family, byte[] super_column)
> {
> this();
> this.column_family = column_family;
> this.super_column = super_column;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.