Community
Participate
Working Groups
If you use the same indicies in the same delete call, they will be processed subsequentially. We should normalize the the list by removing duplicates before deleting the items. public void testRemoveArrayDuplicates() throws Exception { Display display = new Display(); Shell shell = new Shell( display ); Table table = new Table( shell, SWT.NONE ); int number = 5; TableItem[] items = new TableItem[ number ]; for( int i = 0; i < number; i++ ) { items[ i ] = new TableItem( table, 0 ); } assertEquals( 5, table.getItemCount() ); table.remove( new int[] { 1, 1 } ); assertEquals( 4, table.getItemCount() ); }
Created attachment 153323 [details] Final draft Implemented, that if there is the same index twice in the array, the corresponding item is just removed one time in the method Table#remove( int[] ).
Applied patch to CVS HEAD