You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (Updated) (JIRA)" <ji...@apache.org> on 2012/01/20 18:20:41 UTC

[jira] [Updated] (AVRO-1000) GenericArray breaks List.equals specification [java]

     [ https://issues.apache.org/jira/browse/AVRO-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-1000:
-------------------------------

    Attachment: AVRO-1000.patch

Here's a patch that fixes this.
                
> GenericArray breaks List.equals specification [java]
> ----------------------------------------------------
>
>                 Key: AVRO-1000
>                 URL: https://issues.apache.org/jira/browse/AVRO-1000
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>         Environment: Java API
>            Reporter: Sylvain Lebresne
>         Attachments: AVRO-1000.patch
>
>
> GenericArray (or more precisely GenericData$Array) implements the java.util.List interface but breaks the equals specification (and the hashCode one if it's coherent though I haven't checked). More precisely, no List can be equal to a GenericArray unless it is a GenericArray itself. It makes using a "List" from an Avro Object fairly dangerous to use.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira