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/08/06 13:02:49 UTC

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

     [ https://issues.apache.org/jira/browse/SLING-2988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-2988.
-----------------------------------

    
> 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 null 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. Just returning null is confusing, because it is not obvious from the Javadoc that no JCR attribute can be converted into a primitive.
> 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