[jira] Updated: (SLING-832) ValueMapDecorator does not support arrays.
[ https://issues.apache.org/jira/browse/SLING-832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra updated SLING-832: --- Attachment: ValueMapDecorator.r735030.patch fixes this issues by supported array types. > 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 > Attachments: ValueMapDecorator.r735030.patch > > > 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(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.
[jira] Updated: (SLING-832) ValueMapDecorator does not support arrays.
[ https://issues.apache.org/jira/browse/SLING-832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated SLING-832: --- Affects Version/s: (was: Scripting API 2.0.2) API 2.0.2 Fix Version/s: API 2.0.4 Correct version > 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: API 2.0.2 >Reporter: Tobias Bocanegra >Assignee: Carsten Ziegeler > Fix For: API 2.0.4 > > Attachments: ValueMapDecorator.r735030.patch > > > 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(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.