[ 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