I got this error
in 'reader', line 8, column 1:
time:
^
java.lang.NoSuchMethodException: com.test.Cfg$Time.()
in 'reader', line 9, column 3:
c: 5000
^
when I've tried to load a Cfg
bean:
Yaml yml = new Yaml();
Cfg cfg = yml.loadAs(file, Cfg.class);
Here is my bean class
public class Cfg {
private Time time;
// getters & setters ommited
public class Time {
private Long c;
private Long r;
// getters & setters ommited
}
}
And my YML file
---
time:
c: 5000
r: 5000
I use Java 6.
How can I fix it?