[
https://issues.apache.org/jira/browse/THRIFT-3098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498656#comment-14498656
]
Hudson commented on THRIFT-3098:
--------------------------------
SUCCESS: Integrated in Thrift #1510 (See
[https://builds.apache.org/job/Thrift/1510/])
THRIFT-3098 Print binary typedefs the same way we do binary fields (jensg: rev
f9c318ca9e4b176a9b0220f9c8e872089ac8e720)
* compiler/cpp/src/generate/t_java_generator.cc
> 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)