[
https://issues.apache.org/jira/browse/SLING-6416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15760921#comment-15760921
]
Stefan Seifert commented on SLING-6416:
---------------------------------------
resourceresolver-mock relies on the conversion logic of the ValueMap decorator
https://github.com/apache/sling/blob/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/ValueMapDecorator.java#L64
which is not very "smart" (as the TODO in the code indicates which is there
since nearly 8 years, and the code has not changes much since then). it has no
special type conversion support for BigDecimal yet. a better solution is the
NumberConverter from jcr.resource.
we should improve this code as well. when this is done we have to copy or embed
it to resourceresolver-mock, so we do not introduce such a new API dependency
to it.
> MockValueMap does not permit to get a BigDecimal value
> ------------------------------------------------------
>
> Key: SLING-6416
> URL: https://issues.apache.org/jira/browse/SLING-6416
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: Testing ResourceResolver Mock 1.1.14
> Reporter: Christophe Jelger
> Assignee: Stefan Seifert
>
> The {{get(String name, Class<T> type)}} method in {{MockValueMap.java}} does
> not support {{BigDecimal}} as a type. This is supported by the
> {{JcrValueMap}} and {{JcrPropertyMapCacheEntry}} classes, and hence means
> that it's not possible to test code that reads a {{BigDecimal}} property
> value from the JCR.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)