agrison / jtoml

TOML for Java
MIT License
45 stars 13 forks source link

Serialization failed #18

Open eiryu opened 9 years ago

eiryu commented 9 years ago
# groovy
class Foo {
    private String name;

    public Foo(){}

    public String getName() {
        return name
    }

    public void setName(String name) {
        this.name = name
    }
}

Foo foo = new Foo()
foo.name = 'eiryu'
println Toml.serialize('root', foo)
.
.
.
.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.cachedClassRef.info.modifiedExpandos`.
    ... 1024 more
Caused by: java.lang.StackOverflowError
    at me.grison.jtoml.impl.SimpleTomlSerializer.serialize(SimpleTomlSerializer.java:101)
    ... 1021 more