Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337274 - Unchecked Exception thrown by mouseDoubleClick method of MouseEvent listner
Summary: Unchecked Exception thrown by mouseDoubleClick method of MouseEvent listner
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Donald Dunne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-15 22:17 EST by Justin Wayne CLA
Modified: 2021-07-05 11:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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