]> source.dussan.org Git - vaadin-framework.git/commitdiff
Throw exception early on null itemId (#16541)
authorvilo <viliam.durina@gmail.com>
Fri, 30 Jan 2015 11:05:31 +0000 (12:05 +0100)
committerVaadin Code Review <review@vaadin.com>
Fri, 20 May 2016 08:40:15 +0000 (08:40 +0000)
Change-Id: Iff42a6e9e5e00006c96fa82e102ff145449c6f88

server/src/main/java/com/vaadin/ui/Table.java

index b303fddd81294efcd5b5929483567e027dd00a86..f518f4f161eb1406416e242ffa864ab8b121e620 100644 (file)
@@ -2221,6 +2221,9 @@ public class Table extends AbstractSelect implements Action.Container,
             List<?> itemIds = getItemIds(firstIndex, rows);
             for (int i = 0; i < rows && i < itemIds.size(); i++) {
                 Object id = itemIds.get(i);
+                if (id == null) {
+                    throw new IllegalStateException("Null itemId returned from container");
+                }
                 // Start by parsing the values, id should already be set
                 parseItemIdToCells(cells, id, i, firstIndex, headmode, cols,
                         colids, firstIndexNotInCache, iscomponent,