ValueMapDecorator does not support arrays.
------------------------------------------
Key: SLING-832
URL: https://issues.apache.org/jira/browse/SLING-832
Project: Sling
Issue Type: Improvement
Components: API
Affects Versions: Scripting API 2.0.2
Reporter: Tobias Bocanegra
albeit the JcrPropertyMap supports arrays, the wrapper does not and yields to
unexpected problems when using it.
eg: i use the following code, to get a detached copy of a jcr property map:
Node content = node.getNode("jcr:content");
ValueMap props = new JcrPropertyMap(content);
// create detached copy
ValueMap properties = new ValueMapDecorator(new HashMap<String,
Object>(props));
and the following does not work:
String[] values = properties.get("myProp", new String[0]);
although it works on the JcrPropertyMap
ps: will provide a patch
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.