[MGNLEE-775] ContentMap#get method doesn't consider the PropertyType.REFERENCE type as array Created: 17/Mar/23  Updated: 17/Mar/23  Resolved: 17/Mar/23

Status: Closed
Project: Magnolia DX Core
Component/s: None
Affects Version/s: 6.2.29
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MAGNOLIA-8834 ContentMap doesn't consider the possi... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLEE-776 Implementation Sub-task To Do  
MGNLEE-778 Review Sub-task To Do  
MGNLEE-779 Pre-Integration QA Sub-task To Do  
MGNLEE-780 QA Sub-task To Do  
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)
Team: Nucleus

 Description   

When the ContentMap class is used for retrieve a REFERENCE property as jcr:predecessor it will fail because the get method won't consider it as multivalue.

It would be better to include at the else if (type == PropertyType.REFERENCE) statement another check like  "if (prop.isMultiple())" so for those cases like jcr:predecessors, it won't thrown error as:

jcr:predecessors is a multi-valued property, so it's values can only be retrieved as an array


Generated at Mon Feb 12 05:33:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.