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

Felix Meschberger resolved SLING-988.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: API 2.0.6

Thanks for reporting the issue and providing the patch.

Applied your patch slightly modified in Rev. 780748. The modification is in the 
test case, which checks for an empty map and not for ValueMap.EMPTY.

> [PATCH] ResourceUtil.getValueMap() causes NPE
> ---------------------------------------------
>
>                 Key: SLING-988
>                 URL: https://issues.apache.org/jira/browse/SLING-988
>             Project: Sling
>          Issue Type: Bug
>          Components: API
>    Affects Versions: API 2.0.4
>            Reporter: Julian Sedding
>            Assignee: Felix Meschberger
>             Fix For: API 2.0.6
>
>         Attachments: org.apache.sling.api.resource.ResourceUtil.r780648.diff
>
>
> Calling ResourceUtil.getValueMap() with a null Resource should, according to 
> the javadoc, return an empty ValueMap. Calling it with null currently causes 
> a NullPointerException.
> Attached patch fixes the issue and adds a test case for this scenario.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to