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

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

    Resolution: Fixed

In Rev. 780768 I modified the getValueMap method to return a ValueMap which is 
modifiable if the resource is empty or does not adapt to either ValueMap or 
Map. In addition I added more unit tests.

This is now ready, I think. Please close if you agree. Thanks.

> [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