groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Gadot (JIRA) <>
Subject [jira] [Created] (GROOVY-8916) JsonOutput unable to serialize Locale object
Date Mon, 10 Dec 2018 14:07:00 GMT
Sébastien Gadot created GROOVY-8916:

             Summary: JsonOutput unable to serialize Locale object
                 Key: GROOVY-8916
             Project: Groovy
          Issue Type: Bug
          Components: groovy-runtime
    Affects Versions: 2.4.15
            Reporter: Sébastien Gadot

Trying to serialize an object containing a Locale throws StackOverflowException

example :


JsonOutput.toJson([loc: Locale.FRANCE])
// expected {"loc": "fr_FR"}
// got StackOverflowException

at java.lang.reflect.InvocationTargetException.<init>(
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.groovy.reflection.CachedMethod.invoke(
at groovy.lang.MetaBeanProperty.getProperty(
at groovy.lang.PropertyValue.getValue(
at org.codehaus.groovy.runtime.DefaultGroovyMethods.getProperties(
at groovy.json.JsonOutput.getObjectProperties(
at groovy.json.JsonOutput.writeObject(
at groovy.json.JsonOutput.writeMap(
at groovy.json.JsonOutput.writeObject(
at groovy.json.JsonOutput.writeMap(

This message was sent by Atlassian JIRA

View raw message