Skip to content

AVRO-3792 [java]: Fix comparison of Maps within GenericData (java). - #2325

Closed
MarkPaxton wants to merge 1 commit into
apache:masterfrom
MarkPaxton:compareMaps-bug
Closed

MarkPaxton wants to merge 1 commit into
apache:masterfrom
MarkPaxton:compareMaps-bug

Conversation

@MarkPaxton

Copy link
Copy Markdown

What is the purpose of the change

2 bugs in comparing Maps within GenericData:

  • Comparison of size incorrectly compared map1 with map1 not map1 with map2.
  • When maps are empty an exception is incorrectly thrown (iterator().next() fails in that instance).

Verifying this change

This change added unit tests for empty and mismatched size maps.

Documentation

  • Does this pull request introduce a new feature? no

2 bugs: 1 that comparison of size compared map1 with map1 not map1 with map2.
Second is to avoid exception whem maps are emprty, since iterator().next() fails in that instance.

Added unit tests for those conditions.
@github-actions github-actions Bot added the Java Pull Requests for Java binding label Jul 7, 2023
@MarkPaxton MarkPaxton changed the title AVRO-XXXX (JIRA pending) [java]: Fix comparison of Maps within GenericData (java). AVRO-3792 [java]: Fix comparison of Maps within GenericData (java). Jul 7, 2023
@MarkPaxton

Copy link
Copy Markdown
Author

Duplicated by #2318

@MarkPaxton MarkPaxton closed this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java Pull Requests for Java binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant