Description
If a schema has a field with a self-referential record, the applyAliases function produces a NullPointerException.
The problem appears to be that the value for the record put into "seen" has no fields, and then when the equality check is done, the `Schema.equals` method assumes that fields is not null. Making the `equals` method more defensive with null-checking "fields" solves the problem, as the `putAll` method adds the fields back in, but I'm not sure if that is actually the best fix.
I will attach a patch with this fix.
I'm marking this as a blocker for 1.9, as this behavior will cause a NullPointerException in this situation any time data is decoded where the writer and reader schema are different, and there are any aliases defined in the reader (even if these aliases are unrelated to the self-referential record).
Attachments
Attachments
Issue Links
- links to