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

Bryan Duxbury commented on THRIFT-783:
--------------------------------------

I'm not sure... but from the generated code:

{code:title=OneOfEach.java}
boolean this_present_base64 = true && this.isSetBase64();
boolean that_present_base64 = true && that.isSetBase64();
if (this_present_base64 || that_present_base64) {
  if (!(this_present_base64 && that_present_base64))
    return false;
  if (!java.util.Arrays.equals(this.base64, that.base64))
    return false;
}
{code}

base64 is a binary field. This looks correct to me.

> .equals java method is broken on structs containing binary-type fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-783
>                 URL: https://issues.apache.org/jira/browse/THRIFT-783
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Jonathan Ellis
>             Fix For: 0.4
>
>
> The generated code uses field1.equals(field2) (which is never the case except 
> for the trivial one of field1==field2) instead of Arrays.equals(field1, 
> field2).

-- 
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