[
https://issues.apache.org/jira/browse/SLING-4265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278665#comment-14278665
]
Robert Munteanu commented on SLING-4265:
----------------------------------------
I don't think it's an official ValueMap feature, just something that works at
the implementation level.
> 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)