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

Carsten Ziegeler edited comment on SLING-2513 at 6/25/12 1:10 PM:
------------------------------------------------------------------

The problem I see is that you "usually" know the type and it "usually" doesn't 
change. However, it can happen that numbers are stored as strings for example. 
And in this case you'll run into nasty cast exceptions at runtime at some point 
of time. And they even can occur out of the sudden while everything was working 
well for a long time.
One way to solve this would be to specify if the type is a List we always 
return a list of strings, however again this is only useful for some cases
                
      was (Author: cziegeler):
    The problem I see is that you "usually" know the type and it "usually" 
doesn't change. However, it can happen that numbers are stored as strings for 
example. And in this case you'll run into nasty cast exceptions at runtime at 
some point of time. And they even can occur out of the sudden while everything 
was working well for a long time.
One way to solve this would be to say if the type is a List we always return a 
list of strings, however again this is only useful for some cases
                  
> 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