We recently discovered a bug with the Avro serializer where using a map whose values are a union of multiple record schemas fails because the MapWriteContext does not pass each item to createChildObjectContext(), so Jackson can't resolve which schema in the union should be used.
I've added a test that demonstrates the issue and the associated fix in MapWriteContext.
It looks like this issue was fixed upstream as a part of the refactoring in 8b9171c5ba724f9d56f27ec70a120f6aaa89be8c for 3.0, but we'd like to utilize this in 2.9.
Thank you for the fix! Sounds good, and based on earlier work I assume this to be valid.
But I will try to go over this just to make sure I understand it. Should make it in 2.9.6.
We recently discovered a bug with the Avro serializer where using a map whose values are a union of multiple record schemas fails because the
MapWriteContext
does not pass each item tocreateChildObjectContext()
, so Jackson can't resolve which schema in the union should be used.I've added a test that demonstrates the issue and the associated fix in
MapWriteContext
.It looks like this issue was fixed upstream as a part of the refactoring in 8b9171c5ba724f9d56f27ec70a120f6aaa89be8c for 3.0, but we'd like to utilize this in 2.9.