[MAGNOLIA-8335] convertPropertyStringToObject method in PropertiesImportExport doesn't work for multi value properties Created: 04/Mar/22  Updated: 09/May/23

Status: Open
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.17
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File PorpertiesTest.java    
Issue Links:
causality
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: Nucleus Quality Maintenance
Team: Nucleus

 Description   

Steps to reproduce

  1. Use the test case provided that creates a node with a multivalue property as "/node.multiple-values=String[]:{value1,value2}"

Expected results

The test case createSession_SetsNodePropertiesAsMultiValue is correctly executed

Actual results

There is an error:

javax.jcr.ValueFormatException: Cannot call getValues() on a single-value property.

Workaround

Initialise properties otherwise so PropertiesImportExport class is not used. See test case createSession_SetsNodePropertiesAsMultiValue2

Development notes

Method info.magnolia.jcr.util.PropertiesImportExport.convertPropertyStringToObject(String) only considers properties of types date, binary, int or any java.lang.* class Therefore it is not possible to use Arrays or Lists.


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