[
https://issues.apache.org/jira/browse/AVRO-2383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16829000#comment-16829000
]
Hudson commented on AVRO-2383:
------------------------------
SUCCESS: Integrated in Jenkins build AvroJava #657 (See
[https://builds.apache.org/job/AvroJava/657/])
AVRO-2383: NPE during Schema.applyAliases (#510) (fokko:
[https://github.com/apache/avro/commit/196777ccc2e698e9dba153d48a08ef4b68b144a1])
* (edit) lang/java/avro/src/main/java/org/apache/avro/Schema.java
* (edit) lang/java/ipc/src/test/java/org/apache/avro/TestSchema.java
> Avro 1.9 applyAliases broken with self-referential records
> ----------------------------------------------------------
>
> Key: AVRO-2383
> URL: https://issues.apache.org/jira/browse/AVRO-2383
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.9.0
> Reporter: Raman Gupta
> Assignee: Raman Gupta
> Priority: Blocker
> Fix For: 1.9.0
>
> Attachments: AVRO-2383.patch
>
>
> 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).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)