[MAGNOLIA-8404] Map2Bean ignores the "class" property for maps Created: 09/May/22  Updated: 04/Jul/22  Resolved: 13/May/22

Status: Closed
Project: Magnolia
Component/s: node2bean
Affects Version/s: 6.2.18
Fix Version/s: 6.2.19

Type: Bug Priority: Blocker
Reporter: Roberto Gaona Assignee: Jaroslav Simak
Resolution: Fixed Votes: 2
Labels: cs-bk
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1d Time Spent: 1d
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: File config.modules.filter-test.config.yaml     File config.server.filters.testFilter.yaml     Zip Archive filter-test.zip     PNG File image-2022-05-09-14-47-44-135.png     PNG File image-2022-05-09-14-49-10-792.png    
Issue Links:
causality
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-8406 Review Sub-task Closed Milan Divilek  
MAGNOLIA-8407 piQA Sub-task Closed Milan Divilek  
MAGNOLIA-8408 QA Sub-task Completed Canh Nguyen  
MAGNOLIA-8409 Implement support for custom Map types Sub-task Completed Jaroslav Simak  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Support
Sprint: DevX 10
Story Points: 3
Team: DeveloperX

 Description   

Creating an object from Magnolia's configuration calls different mechanisms depending on the way of instantiating it. Performing a manual instantiation calls Map2Bean while Magnolia handles it with Node2Bean.

However, it seems like Map2Bean is ignoring the class property when converting the configuration structure to their respective beans.

Bean created by Magnolia automatically:

Bean created via code:

Here we can see that the map is taking the class property as another value instead of assigning such value to the map type itself.

Attached is a simple filter class to reproduce the issue, along two configuration files that help reproduce it as well.



 Comments   
Comment by Roman Kovařík [ 10/May/22 ]

This might be the place which needs the fix.

Generated at Mon Feb 12 04:32:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.