Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337274

Summary: Unchecked Exception thrown by mouseDoubleClick method of MouseEvent listner
Product: z_Archived Reporter: Justin Wayne <jcwayne2001>
Component: NebulaAssignee: Donald Dunne <donald.g.dunne>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Justin Wayne CLA 2011-02-15 22:17:20 EST
Build Identifier: 

When an empty "spill-over" column exists and the user double clicks in one of the cells of that column, an ArrayIndexOutOfBoundsException is thrown. The stack trace below was generated using the example downloaded from CVS without any modification.

Solution would be to either change the type of for loop, to prevent the potential extra count++, or to add the following just prior to line 71 (where the exception happens):	if (count == columnOrder.length) count = columnOrder.length - 1;

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 9
	at org.eclipse.nebula.widgets.xviewer.XViewer$6.mouseDoubleClick(XViewer.java:252)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:189)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.nebula.widgets.xviewer.example.MyXViewerTest.main(MyXViewerTest.java:71)


Reproducible: Always

Steps to Reproduce:
1. Run the example program.
2. Increase the width of the window sufficiently to result in an "extra" empty column on the far right.
3. Double-click in any cell in the extra column.
Comment 1 Donald Dunne CLA 2011-08-17 16:39:17 EDT
This has already been fixed.  Can't reproduce in current MyXViewerTest.
Comment 2 Donald Dunne CLA 2011-08-17 16:40:00 EDT
closing