Skip to content

Commit 6217b60

Browse files
committed
fix: accumulate all rows in CoreSwtbotTools.tableItems
The loop reassigned the list each iteration, so a table with N rows returned only the last row. Accumulate instead, matching the javadoc and the sibling treeItems helper. Empty tables now return an empty list rather than null.
1 parent 477d9ac commit 6217b60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/CoreSwtbotTools.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public static List<SWTBotTableItem> tableItems(final SWTWorkbenchBot bot, final
346346
waitForTableItem(bot, table);
347347
List<SWTBotTableItem> items = new ArrayList<SWTBotTableItem>();
348348
for (int i = 0; i < table.rowCount(); i++) {
349-
items = new ArrayList<SWTBotTableItem>(Arrays.asList(table.getTableItem(i)));
349+
items.add(table.getTableItem(i));
350350
}
351351
return items;
352352
}

0 commit comments

Comments
 (0)