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

Douglas Kaminsky updated AVRO-796:
----------------------------------

    Description: Schema.equals() does not properly handle null argument - the 
usual expected behavior is that it should return false.  (was: I was writing 
some code that dynamically creates schemas based on existing schemas and 
noticed when I was compiling the schemas I needed to reconstruct that the size 
of my java.util.Set did not reflect the number of times I called the .add 
method on that set. Naturally, I was led to investigate the schema.equals 
method, and noticed some alarming issues.

It seems that the current logic reports that two schemas are equal IFF they are 
both the same in memory OR they are both schemas of the same type with the same 
props. There are several issues that seem to be present here:

1) schema.equals(null) throws an exception instead of returning false as one 
would expect
2) Two schemas of the same type with a different name or documentation are 
considered equal (this may or may not be a "feature")
)
       Priority: Minor  (was: Major)

> Problems using Schema.equals() method
> -------------------------------------
>
>                 Key: AVRO-796
>                 URL: https://issues.apache.org/jira/browse/AVRO-796
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.5.0
>            Reporter: Douglas Kaminsky
>            Priority: Minor
>
> Schema.equals() does not properly handle null argument - the usual expected 
> behavior is that it should return false.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to