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

Joerg Hoh resolved SLING-12754.
-------------------------------
    Fix Version/s: API 3.0.0
       Resolution: Fixed

> 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
>             Fix For: API 3.0.0
>
>
> 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