-
Bug
-
Resolution: Outdated
-
Major
-
None
-
5.0.1
Exact same structure works on 4.5.
i have configuration
- groups
- group1
- label
- value
- group1
On debug i see groups=null=null, groups is a map of string, labelvalueclass
jsimak:
Assume:
private Map<String, DefaultKeyValue> groups; .. void setGroups(Map<String, DefaultKeyValue> groups) { this.groups = groups; }
Content2Bean (4.5) will not resolve DefaultKeyValue as a type (it will create LinkedHashMap instead) and since generics informations are not present at runtime, the content2bean sets LinkedHashMap as a value instead of DefaultKeyValue type. So structure of groups look like this: Map<String, Map>.
Node2Bean (5.0+) will resolve DefaultKeyValue type from generics, instantiates this type and later node2bean will try to populate DefaultKeyValue object with values (via BeanUtils) but it won't fill any value to the object (because we pass for example property name label but DefaultKeyValue doesn't have any setter called setLabel).