You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2009/01/16 16:10:59 UTC

[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<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.