You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2015/09/08 20:57:45 UTC

[jira] [Resolved] (GROOVY-7519) JsonOuput.toJson() leads to StackOverflowException

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

Pascal Schumacher resolved GROOVY-7519.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.4.5

Pull request merged. Thanks!

> JsonOuput.toJson() leads to StackOverflowException
> --------------------------------------------------
>
>                 Key: GROOVY-7519
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7519
>             Project: Groovy
>          Issue Type: Bug
>          Components: JSON
>    Affects Versions: 2.4.4
>            Reporter: dariusan
>            Priority: Critical
>             Fix For: 2.4.5
>
>
> If one wants to generate JSON with groovy.json.JsonOutpout that contains a java.io.File object as property in the object hierarchy a StackOverflowException is thrown
> {code}
> groovy.json.JsonOutput.toJson(new File('.'))
> java.lang.StackOverflowError
> 	at groovy.json.internal.CharBuf.addLong(CharBuf.java:788)
> 	at groovy.json.JsonOutput.writeNumber(JsonOutput.java:216)
> 	at groovy.json.JsonOutput.writeObject(JsonOutput.java:264)
> {code}



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