[
https://issues.apache.org/jira/browse/SLING-3457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937622#comment-13937622
]
Carsten Ziegeler commented on SLING-3457:
-----------------------------------------
I'm not sure if we should do this. If the method returns "true" I would expext
that the resource is a NonExistingResource and therefore then call any method
on the resource object which then results in an NPE.
Even the same if the method would return "false", so I think a NPE is the best
option here. at some point the client code has to check whether the resource is
null or not
> Change ResourceUtil.isNonExistingResource(null) to return true instead of NPE.
> ------------------------------------------------------------------------------
>
> Key: SLING-3457
> URL: https://issues.apache.org/jira/browse/SLING-3457
> Project: Sling
> Issue Type: Improvement
> Affects Versions: API 2.6.0
> Reporter: Florentin Wandeler
> Priority: Minor
>
> currently, as specified in its javadocs,
> ResourceUtil.isNonExistingResource(null) throws a NullPointerException.
> -> Changing this to return true for res == null might be more api
> user-friendly.
--
This message was sent by Atlassian JIRA
(v6.2#6252)