[ 
https://issues.apache.org/jira/browse/SLING-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399993#comment-13399993
 ] 

Carsten Ziegeler commented on SLING-2513:
-----------------------------------------

I agree that would be nice, but as
List<String> list = values.get(propName, List<String>.class); 
doesn't work and
List list = values.get(propName, List.class); 
can easily lead to problems unless the client code checks the type of each 
element in the list which imho defeats the purpose.
I think there isn't much we can do about it
Adding the support for T ValueMap#get(String name, T default Value) would be 
possible, but does not help in all use cases

And it's easy to use the Arrays class to create a list out of the array
                
> 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

        

Reply via email to