[ 
https://issues.apache.org/jira/browse/THRIFT-3098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498560#comment-14498560
 ] 

ASF GitHub Bot commented on THRIFT-3098:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/thrift/pull/445


> Thrift does not pretty print binary typedefs the way it does binary fields
> --------------------------------------------------------------------------
>
>                 Key: THRIFT-3098
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3098
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Roshan George
>            Assignee: Jens Geyer
>            Priority: Trivial
>             Fix For: 0.9.3
>
>
> The generated Java struct toString uses TBaseHelper.toString to print binary 
> fields but not fields which are typedef binary.
> e.g.
> {code}
> typedef BinType binary
> struct BinHolder {
>  1: binary bin_field
>  2: BinType typedef_field
> }
> {code}
> results in
> {code}
>  sb.append("bin_field:");
>     if (this.bin_field == null) {
>       sb.append("null");
>     } else {
>       org.apache.thrift.TBaseHelper.toString(this.bin_field, sb);
>     }
>     first = false;
>     if (!first) sb.append(", ");
>     sb.append("typedef_field:");
>     if (this.typedef_field == null) {
>       sb.append("null");
>     } else {
>       sb.append(this.typedef_field);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to