[MAGNOLIA-5190] Module configuration map does not load class values Created: 17/Jul/13 Updated: 27/Apr/18 Resolved: 27/Apr/18 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | content2bean |
| Affects Version/s: | 5.0.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Teresa Miyar | Assignee: | Unassigned |
| Resolution: | Outdated | Votes: | 0 |
| Labels: | maintenance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Epic Link: | Support |
| Description |
|
Exact same structure works on 4.5.
On debug i see groups=null=null, groups is a map of string, labelvalueclass jsimak: 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). |