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

Krystian Nowak updated SLING-6433:
----------------------------------
    Attachment: SLING-6433-krystian.patch

Patch attached

> Request Processing Analyzer throws IOOB due to old format assumptions of 
> RequestProgressTracker output
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6433
>                 URL: https://issues.apache.org/jira/browse/SLING-6433
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Krystian Nowak
>             Fix For: Request Analyzer 1.0.0
>
>         Attachments: SLING-6433-krystian.patch
>
>
> In certain cases Request Processing Analyzer throws IndexOutOfBoundsException 
> and fails to display request details:
> {noformat}
> Exception in thread "AWT-EventQueue-0" 
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>       at java.lang.String.substring(String.java:1931)
>       at 
> org.apache.sling.reqanalyzer.impl.gui.RequestTableModel.addRow(RequestTableModel.java:37)
>       at 
> org.apache.sling.reqanalyzer.impl.gui.RequestTrackerFile.getData(RequestTrackerFile.java:64)
>       at 
> org.apache.sling.reqanalyzer.impl.gui.RequestListSelectionListener.valueChanged(RequestListSelectionListener.java:65)
>       at 
> javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
>       at 
> javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:154)
>       at 
> javax.swing.DefaultListSelectionModel.setValueIsAdjusting(DefaultListSelectionModel.java:685)
>       at 
> javax.swing.plaf.basic.BasicTableUI$Handler.setValueIsAdjusting(BasicTableUI.java:953)
>       at 
> javax.swing.plaf.basic.BasicTableUI$Handler.mouseReleased(BasicTableUI.java:1166)
>       at 
> javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mouseReleased(BasicTableUI.java:802)
>       at 
> java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
>       at java.awt.Component.processMouseEvent(Component.java:6533)
>       at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
>       at java.awt.Component.processEvent(Component.java:6298)
>       at java.awt.Container.processEvent(Container.java:2236)
>       at java.awt.Component.dispatchEventImpl(Component.java:4889)
>       at java.awt.Container.dispatchEventImpl(Container.java:2294)
>       at java.awt.Component.dispatchEvent(Component.java:4711)
>       at 
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
>       at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
>       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
>       at java.awt.Container.dispatchEventImpl(Container.java:2280)
>       at java.awt.Window.dispatchEventImpl(Window.java:2746)
>       at java.awt.Component.dispatchEvent(Component.java:4711)
>       at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
>       at java.awt.EventQueue.access$500(EventQueue.java:97)
>       at java.awt.EventQueue$3.run(EventQueue.java:709)
>       at java.awt.EventQueue$3.run(EventQueue.java:703)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
>       at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
>       at java.awt.EventQueue$4.run(EventQueue.java:731)
>       at java.awt.EventQueue$4.run(EventQueue.java:729)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
>       at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
>       at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
>       at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
>       at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
>       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
>       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>       at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
> {noformat}
> This is due to an old (pre-SLING-4114) assumptions on RequestProgressTracker 
> output.
> SLING-4114 removed date and time fields which were ending in closing 
> parenthesis but the analyzer is still looking for it while calculating string 
> index. In most of the cases the request details are just wrongly displayed, 
> but when the closing parenthesis character is at the end of the string then 
> the index exceeds string length resulting in the exception. The solution is 
> to update the code to the current RequestProgressTracker output format 
> without those removed fields.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to