Joerg Hoh created SLING-12754:
---------------------------------

             Summary: 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


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)

Reply via email to