You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2015/01/14 12:19:35 UTC

[jira] [Commented] (SLING-4265) Tolerate a null class argument passed to MockValueMap.get(String, Class)

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

Stefan Seifert commented on SLING-4265:
---------------------------------------

ok, although i'm wondering why this is not a feature supported by ValueMapDecorator itself, if it is an official ValueMap features.

or is it only a feature by the current JCR value map implementation which we want to simulate here as well? then it's ok as well, that's on of the primary goal of the mocks to behave as close as the JCR implementation as possible, although this sets aside other resource provider a bit.

> Tolerate a null class argument passed to MockValueMap.get(String, Class<T>)
> ---------------------------------------------------------------------------
>
>                 Key: SLING-4265
>                 URL: https://issues.apache.org/jira/browse/SLING-4265
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>    Affects Versions: Testing ResourceResolver Mock 1.1.0
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Minor
>             Fix For: Testing ResourceResolver Mock 1.1.2
>
>
> I've seen various mock resource resolver implementations tolerate a null class argument when calling ResourceResolver.get(String, Class). This might not be best practice but it's unfortunately undefined by the actual ResourceResolver interface javadoc and in practice some implementation do allow it.
> Therefore I propose that we allow this to work as well for the MockValueMap by attempting to perform no casting when the class argument is null.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)