[ 
https://issues.apache.org/jira/browse/AVRO-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Douglas Kaminsky updated AVRO-1854:
-----------------------------------
    Attachment: RecursiveFlattenBugRegression.java

> NPE on recursive datatype in JSON encoder
> -----------------------------------------
>
>                 Key: AVRO-1854
>                 URL: https://issues.apache.org/jira/browse/AVRO-1854
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.7
>            Reporter: Douglas Kaminsky
>            Priority: Critical
>         Attachments: RecursiveFlattenBugRegression.java
>
>
> When trying to encode to JSON a record whose schema contains a recursive type 
> embedded in another type (ie. an array), the "flatten" method in the 
> {{Parser}} leaves a hole in the middle of the symbol stack which causes a NPE 
> to occur. My best guess is that it's leaving space for the embedded recursion 
> but never populating the symbol, but that code is a bit obtuse so I am having 
> trouble getting to the root cause (otherwise I would have provided a patch to 
> solve the problem as well).
> Attached is a class with a short main method that replicates the problem with 
> anonymized versions of my datatypes/record and a screenshot of the symbol 
> stack at runtime right before the error occurs.
> Not yet tested in 1.8.0 but should be easy to verify.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to