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

Carsten Ziegeler updated SLING-3349:
------------------------------------

    Description: 
If the resource returns null or the empt string for the resource type, this 
ends up in an uncatched exception within the servlet resolver, e.g. for the 
empty string (it would be an NPE for null):

ava.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:686)
        at 
org.apache.sling.servlets.resolver.internal.SlingServletResolver.resolveServlet(SlingServletResolver.java:583)


  was:
If the resource returns null for the resource type, this ends up in an 
uncatched exception within the servlet resolver:

ava.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:686)
        at 
org.apache.sling.servlets.resolver.internal.SlingServletResolver.resolveServlet(SlingServletResolver.java:583)



> Guard servlet resolver against no resource type
> -----------------------------------------------
>
>                 Key: SLING-3349
>                 URL: https://issues.apache.org/jira/browse/SLING-3349
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.2.4
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Servlets Resolver 2.2.6
>
>
> If the resource returns null or the empt string for the resource type, this 
> ends up in an uncatched exception within the servlet resolver, e.g. for the 
> empty string (it would be an NPE for null):
> ava.lang.StringIndexOutOfBoundsException: String index out of range: 0
>       at java.lang.String.charAt(String.java:686)
>       at 
> org.apache.sling.servlets.resolver.internal.SlingServletResolver.resolveServlet(SlingServletResolver.java:583)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to