[
https://issues.apache.org/jira/browse/SLING-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400171#comment-13400171
]
Georg Henzler commented on SLING-2513:
--------------------------------------
Although java isn't expressive enough to handle our problem nicely, I still
think it would be useful to be able to use lists...
T ValueMap#get(String name, T default Value)
is easy to add and
@SuppressWarnings("unchecked")
List<String> list = (List<String>) values.get(propName, List.class);
isn't exactly nice but wouldn't normally cause problems as the developer knows
what type is in the JCR (and the type doesn't usually change).
> ValueMap#get(java.lang.String name, T defaultValue) should support
> java.util.List for multivalue properties
> -----------------------------------------------------------------------------------------------------------
>
> Key: SLING-2513
> URL: https://issues.apache.org/jira/browse/SLING-2513
> Project: Sling
> Issue Type: Improvement
> Components: JCR
> Affects Versions: JCR Resource 2.0.10
> Reporter: Konrad Windszus
>
> Instead of just supporting arrays, the ValueMap used for JCR access should
> support java.util.List as well.
> I know that this is not supported by the JCR API, but it would be very
> useful, if that list would be extended afterwards.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira