You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/07/31 11:27:48 UTC

[jira] [Commented] (SLING-2988) Support primitive types for ValueMap.get()

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

Carsten Ziegeler commented on SLING-2988:
-----------------------------------------

>From the javadocs of ValueMap:

   * This method does not support conversion into a primitive type or an
     * array of a primitive type. It should return <code>null</code> in this
     * case.
                
> Support primitive types for ValueMap.get()
> ------------------------------------------
>
>                 Key: SLING-2988
>                 URL: https://issues.apache.org/jira/browse/SLING-2988
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Konrad Windszus
>
> Currently the call for ValueMap.get(<name>, boolean.class) returns false while ValueMap.get(<name>, Boolean.class) returns true for a JCR property with type String having the value "true". 
> Please either throw an exception if primitive classes are given as second argument or support them as well.
> Currently the Javadoc states that this call either returns null or the value. Assigning null to a primitive would lead to an NPE.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira