You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Sylvain Lebresne (Created) (JIRA)" <ji...@apache.org> on 2012/01/20 11:49:39 UTC
[jira] [Created] (AVRO-1000) GenericArray breaks List.equals
specification [java]
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
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
[jira] [Updated] (AVRO-1000) GenericArray breaks List.equals
specification [java]
Posted by "Doug Cutting (Updated) (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (AVRO-1000) GenericArray breaks List.equals
specification [java]
Posted by "Doug Cutting (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-1000:
-------------------------------
Fix Version/s: 1.6.2
Assignee: Doug Cutting
Status: Patch Available (was: Open)
I think it's safe to simply remove these methods.
I'll commit this soon if there are no objections.
> 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
> Assignee: Doug Cutting
> Fix For: 1.6.2
>
> 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
[jira] [Updated] (AVRO-1000) GenericArray breaks List.equals
specification [java]
Posted by "Doug Cutting (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-1000:
-------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
I committed 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
> Assignee: Doug Cutting
> Fix For: 1.6.2
>
> 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