Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 141584 Details for
Bug 283263
ArrayIndexOutofBoundsException when clicking on the Pixel Row just below the Table Header.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Bugfix
clipboard.txt (text/plain), 2.29 KB, created by
RĂ¼diger Herrmann
on 2009-07-14 19:25:19 EDT
(
hide
)
Description:
Bugfix
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2009-07-14 19:25:19 EDT
Size:
2.29 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >Index: src/org/eclipse/swt/widgets/Table.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Table.java,v >retrieving revision 1.71 >diff -u -r1.71 Table.java >--- src/org/eclipse/swt/widgets/Table.java 14 Jul 2009 23:13:12 -0000 1.71 >+++ src/org/eclipse/swt/widgets/Table.java 14 Jul 2009 23:27:13 -0000 >@@ -699,11 +699,11 @@ > if( itemArea.contains( point ) ) { > int itemHeight = getItemHeight(); > int index = ( ( point.y - headerHeight ) / itemHeight ) - 1; >- if( point.y == 0 || point.y % itemHeight != 0 ) { >+ if( point.y == headerHeight || point.y % itemHeight != 0 ) { > index++; > } > index += topIndex; >- if( index < itemCount ) { >+ if( index >= 0 && index < itemCount ) { > result = _getItem( index ); > } > } >#P org.eclipse.rap.rwt.test >Index: src/org/eclipse/swt/widgets/Table_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.test/src/org/eclipse/swt/widgets/Table_Test.java,v >retrieving revision 1.51 >diff -u -r1.51 Table_Test.java >--- src/org/eclipse/swt/widgets/Table_Test.java 14 Jul 2009 23:13:16 -0000 1.51 >+++ src/org/eclipse/swt/widgets/Table_Test.java 14 Jul 2009 23:27:16 -0000 >@@ -1724,6 +1724,23 @@ > } > > /* >+ * 283263: ArrayIndexOutOfBoundsException when clicking on the Pixel Row just >+ * below the Table Header. >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=283263 >+ */ >+ public void testGetItemBelowHeader() { >+ Display display = new Display(); >+ Shell shell = new Shell( display ); >+ Table table = new Table( shell, SWT.NONE ); >+ table.setHeaderVisible( true ); >+ table.setSize( 100, 100 ); >+ new TableItem( table, SWT.NONE ); >+ TableItem item = table.getItem( new Point( 10, table.getItemHeight() ) ); >+ assertNotNull( item ); >+ assertEquals( 0, table.indexOf( item ) ); >+ } >+ >+ /* > * Ensures that checkData calls with an invalid index are silently ignored. > * This may happen, when the itemCount is reduced during a SetData event. > * Queued SetData events may then have stale (out-of-bounds) indices.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283263
: 141584