[ 
https://issues.apache.org/jira/browse/AVRO-1923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15533880#comment-15533880
 ] 

Doug Cutting commented on AVRO-1923:
------------------------------------

The remove doesn't need to be in a 'finally' block.  I mistakenly pseudo-coded 
it that way to simplify return logic, but this wasn't needed as the toString 
logic doesn't use return.

The reason for removing each time is to bound the size of the map to the depth 
of the stack.  Otherwise it grows to the size of the structure.  It'll work 
fine without the removes too, I just preferred to minimize memory use.

Your patch looks fine.  +1

> Recursive record causes StackOverflow in GenericData.toString
> -------------------------------------------------------------
>
>                 Key: AVRO-1923
>                 URL: https://issues.apache.org/jira/browse/AVRO-1923
>             Project: Avro
>          Issue Type: Bug
>            Reporter: Niels Basjes
>            Assignee: Niels Basjes
>         Attachments: AVRO-1923-Unittest.patch
>
>




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

Reply via email to