diff --git a/org.eclipse.scout.rt.client.test/src/test/java/org/eclipse/scout/rt/client/ui/basic/table/HierarchicalTableTest.java b/org.eclipse.scout.rt.client.test/src/test/java/org/eclipse/scout/rt/client/ui/basic/table/HierarchicalTableTest.java index 445d8c51706..b89a3603572 100644 --- a/org.eclipse.scout.rt.client.test/src/test/java/org/eclipse/scout/rt/client/ui/basic/table/HierarchicalTableTest.java +++ b/org.eclipse.scout.rt.client.test/src/test/java/org/eclipse/scout/rt/client/ui/basic/table/HierarchicalTableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2023 BSI Business Systems Integration AG + * Copyright (c) 2010, 2025 BSI Business Systems Integration AG * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -50,9 +50,8 @@ public void testCorrectRowOrderAfterAddRows() { } /** - * Table expect always to have all parent rows + * Table ignores rows with non-existing parent. */ - @Test(expected = IllegalArgumentException.class) public void testAddRowsWithInvalidRowList() { P_SinglePrimaryKeyColumnTable table = new P_SinglePrimaryKeyColumnTable(); table.init(); @@ -61,12 +60,14 @@ public void testAddRowsWithInvalidRowList() { rows.add(table.createRow(new Object[]{2, null})); rows.add(table.createRow(new Object[]{3, 4})); table.addRows(rows); + + assertEquals(3, table.getRowCount()); + assertEquals(2, table.getFilteredRowCount()); } /** - * Table expect always to have all parent rows + * Table ignores rows with non-existing parent. */ - @Test(expected = IllegalArgumentException.class) public void testAddRowWithUnresolvedParentRow() { P_SinglePrimaryKeyColumnTable table = new P_SinglePrimaryKeyColumnTable(); table.init(); @@ -74,8 +75,12 @@ public void testAddRowWithUnresolvedParentRow() { rows.add(table.createRow(new Object[]{1, null})); rows.add(table.createRow(new Object[]{2, null})); table.addRows(rows); + assertEquals(2, table.getRowCount()); + assertEquals(2, table.getFilteredRowCount()); table.addRow(table.createRow(new Object[]{3, 4})); + assertEquals(3, table.getRowCount()); + assertEquals(2, table.getFilteredRowCount()); } /** diff --git a/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTable.java b/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTable.java index 6f9f0cb5e07..43c5464d2ec 100644 --- a/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTable.java +++ b/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/basic/table/AbstractTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2023 BSI Business Systems Integration AG + * Copyright (c) 2010, 2025 BSI Business Systems Integration AG * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -649,10 +649,10 @@ protected CheckableStyle getConfiguredCheckableStyle() { * Subclasses can override this method. Default is {@link TriState#UNDEFINED} * * @return