You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2016/06/03 06:46:59 UTC

[jira] [Resolved] (SLING-5757) NonExistingResource.getParent() should not return null in case the parent is non-existing

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

Konrad Windszus resolved SLING-5757.
------------------------------------
       Resolution: Fixed
    Fix Version/s: API 2.12.0

I applied the patch with a different testing approach (just leveraging JMock) in [r1746673|https://svn.apache.org/r1746673].

> NonExistingResource.getParent() should not return null in case the parent is non-existing
> -----------------------------------------------------------------------------------------
>
>                 Key: SLING-5757
>                 URL: https://issues.apache.org/jira/browse/SLING-5757
>             Project: Sling
>          Issue Type: Bug
>          Components: API
>    Affects Versions: API 2.11.0
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>             Fix For: API 2.12.0
>
>         Attachments: SLING-5757-v01.patch
>
>
> Currently {{NonExistingResource.getParent()}} returns {{null}} in case the parent does not exist either. According to the javadoc of {{Resource.getParent()}}  {{null}} should only be returned when the current resource is already the root resource. 
> Therefore {{NonExistingResource.getParent()}} should rather return a {{NonExistingResource}} as well, in case the parent does not exist.
> Compare with the discussion at http://www.mail-archive.com/dev@sling.apache.org/msg56294.html.



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