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

Bryan Duxbury commented on THRIFT-172:
--------------------------------------

This is a nice improvement. 

I think there might be a slight bug in terms of printing some bytes. In Java, 
bytes are signed, so FF as a byte is a negative number. This is probably 
counter to what most people would like to see printed.

If you bitwise-and the byte with 0xFF first, it'll get converted to an unsigned 
integer. Then, toHexString will produce what we're expecting to get.

> Improve printing of "binary"
> ----------------------------
>
>                 Key: THRIFT-172
>                 URL: https://issues.apache.org/jira/browse/THRIFT-172
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java)
>            Reporter: Nathan Marz
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: thrift-172-v2.patch, thrift-172.patch
>
>
> RIght now, binary values print as "[EMAIL PROTECTED])", which provides no 
> information. It would be better if binary values printed like "'00 00 00 00 
> 00 00 00 00 00 00 00 00 00 00 00 01".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to