[ 
https://issues.apache.org/jira/browse/SLING-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057571#comment-13057571
 ] 

Justin Edelson commented on SLING-2099:
---------------------------------------

Thanks for the patch.

applied in r1141352.

> NPE in SlingServletResolver.resolveServlet() for no matches if debug logging 
> enabled
> ------------------------------------------------------------------------------------
>
>                 Key: SLING-2099
>                 URL: https://issues.apache.org/jira/browse/SLING-2099
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Justin Edelson
>            Priority: Minor
>             Fix For: Servlets Resolver 2.1.2
>
>         Attachments: SLING-2099.patch
>
>
> Steps to reproduce:
> - enable debug logging for org.apache.sling.servlets.resolver
> - call SlingServletResolver.resolveServlet(rr, "doesnotexist.jsp")
> => results in this stacktrace:
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.sling.api.request.RequestUtil.getServletName(RequestUtil.java:129)
>       at 
> org.apache.sling.servlets.resolver.internal.SlingServletResolver.resolveServlet(SlingServletResolver.java:360)
>       at 
> org.apache.sling.servlets.resolver.internal.SlingServletResolver.resolveServlet(SlingServletResolver.java:320)
> The problem is in the internal resolveServlet(), where in the servlet == null 
> and log.isDebugEnabled() case, RequestUtil.getServletName(servlet) is called, 
> which throws for a null argument.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to