[
https://issues.apache.org/jira/browse/SLING-12754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946367#comment-17946367
]
Carsten Ziegeler commented on SLING-12754:
------------------------------------------
I think, in addition AbstractResource.getName() should be fixed as this one is
not expected to throw those exceptions (neither NPE nor
IllegalArgumentException)
> NPE in error handling
> ---------------------
>
> Key: SLING-12754
> URL: https://issues.apache.org/jira/browse/SLING-12754
> Project: Sling
> Issue Type: Task
> Components: API
> Affects Versions: API 2.27.6
> Reporter: Joerg Hoh
> Assignee: Joerg Hoh
> Priority: Major
>
> I've seen this NPE:
> {noformat}
> GET
> /libs/granite/core/content/login/favicon.ico/.../.../.../.../.../.../.../.../.../windows/win.ini
> HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver
> Calling the error handler resulted in an error
> java.lang.NullPointerException: Cannot invoke "String.lastIndexOf(int)"
> because "path" is null
> at
> org.apache.sling.api.resource.ResourceUtil.getName(ResourceUtil.java:285)
> [org.apache.sling.api:2.27.6]
> at
> org.apache.sling.api.resource.AbstractResource.getName(AbstractResource.java:53)
> [org.apache.sling.api:2.27.6]
> at
> com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl.findErrorsPath(ErrorPageHandlerImpl.java:344)
> [com.adobe.acs.acs-aem-commons-bundle:6.0.10]
> [...]
> {noformat}
> According to its Javadoc {{ResourceUtil.getName()}} should throw an
> IllegalArgumentException if the path cannot be normalized, which it does not
> right now.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)