You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sverre Boschman (JIRA)" <ji...@apache.org> on 2013/01/26 17:07:13 UTC

[jira] [Created] (WICKET-5009) Method AbstractRequestLogger.hasBufferRolledOver does not handle situation where requestWindow is a zero-length array

Sverre Boschman created WICKET-5009:
---------------------------------------

             Summary: Method AbstractRequestLogger.hasBufferRolledOver does not handle situation where requestWindow is a zero-length array
                 Key: WICKET-5009
                 URL: https://issues.apache.org/jira/browse/WICKET-5009
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.4.0
            Reporter: Sverre Boschman


[2013-01-25 18:05:55,378] [ERROR] [ajp-bio-8019-exec-58] org.apache.wicket.request.cycle.RequestCycle | Exception occurred during onEndRequest
java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.wicket.protocol.http.AbstractRequestLogger.hasBufferRolledOver(AbstractRequestLogger.java:185)
        at org.apache.wicket.protocol.http.AbstractRequestLogger.resizeBuffer(AbstractRequestLogger.java:448)
        at org.apache.wicket.protocol.http.AbstractRequestLogger.addRequest(AbstractRequestLogger.java:339)
        at org.apache.wicket.protocol.http.CobraRequestLogger.addRequest(CobraRequestLogger.java:40)
        at org.apache.wicket.protocol.http.AbstractRequestLogger.requestTime(AbstractRequestLogger.java:246)
        at org.apache.wicket.Application$2.onEndRequest(Application.java:1640)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$2.notify(RequestCycleListenerCollection.java:85)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$2.notify(RequestCycleListenerCollection.java:81)
        at org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onEndRequest(RequestCycleListenerCollection.java:80)
        at org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:606)
        at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:568)
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:286)
        at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)


Check for zero-length array is after the call to resizeBuffer() in the method addRequest:
			// if the requestWindow is a zero-length array, nothing gets stored
			if (requestWindow.length == 0)
				return;

The reason why the requestWindow array was initialized with length 0 at all is still something I am looking into, but the exception in hasBufferRolledOver prevents the resizeBuffer method to lazy init the array at a later moment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira