[
https://issues.apache.org/jira/browse/AVRO-3792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741012#comment-17741012
]
Christophe Le Saec commented on AVRO-3792:
------------------------------------------
Good check and good PR but fix already exists with [this
JIRA|https://issues.apache.org/jira/browse/AVRO-3789] and a PR that look like
yours.
At least, it means that this bug is visible and should be fixed quick
([~rskraba]).
> GenericData compare fails for Maps size = 0 or sizes not same
> -------------------------------------------------------------
>
> Key: AVRO-3792
> URL: https://issues.apache.org/jira/browse/AVRO-3792
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.11.2
> Reporter: Mark Paxton
> Priority: Major
>
> Comparison of GenericData in the java avro library is incorrectly implemented.
>
> Two bugs exists:
> 1) Shortcut returning of 'different' is wrong, since it compares m1.size() !=
> m1.size() instead of m1.size() != m2.size()
>
> 2) When one of both maps are empty, the iterator throws an exception. There
> is no 'isEmpty' check.
>
> See PR: [https://github.com/apache/avro/pull/2325]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)