You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Joerg Hoh (Jira)" <ji...@apache.org> on 2025/04/23 07:32:00 UTC
[jira] [Created] (SLING-12757) AbstractResource.getName() can throw exceptions
Joerg Hoh created SLING-12757:
---------------------------------
Summary: AbstractResource.getName() can throw exceptions
Key: SLING-12757
URL: https://issues.apache.org/jira/browse/SLING-12757
Project: Sling
Issue Type: Task
Components: API
Affects Versions: API 2.27.6
Reporter: Joerg Hoh
{{AbstractResource.getName()}} can throw both a NPE and an IllegalArgumentException, because these can thrown by {{ResourceUtil.getName()}}, although this is not documented.
We have 2 options:
* keep the existing implementation and adjust the API doc, that it can throw these exceptions.
* stick to the existing API doc and catch&log these 2 exceptions. This leaves the question what to return in this case.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)