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

Carsten Ziegeler commented on SLING-9925:
-----------------------------------------

This sounds like an abuse in the invocation pattern. My guess is that a custom 
filter is catching an exception and when doing so, invoking the filter chain 
again - which means that the filter chain is invoked more often than 
anticipated.

However, we can probably easily fix this by decrementing this.current in the 
finally block of the doFilter method, restoring the state to the same values as 
before the invokation. 
We probably need to think about how to handle the timing of the filter method. 
So probably instead of setting times[filterIdx] in the filter method, 
incrementing it 

> ArrayIndexOutOfBoundsException in AbstractSlingFilterChain
> ----------------------------------------------------------
>
>                 Key: SLING-9925
>                 URL: https://issues.apache.org/jira/browse/SLING-9925
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.7.2
>            Reporter: Karl Pauls
>            Priority: Major
>             Fix For: Engine 2.7.3
>
>
> Apparently, it is possible for an AIOOB Exception to happen in the 
> AbstractSlingFilterChain. Unclear to me why but it looks like this:
> {code:java}
> rg.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught 
> Throwable
> java.lang.ArrayIndexOutOfBoundsException: Index 29 out of bounds for length 29
>         at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:86)
>  [org.apache.sling.engine:2.7.2]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to