]> source.dussan.org Git - vaadin-framework.git/commitdiff
#6603 AbstractBeanContainer.addAll does not ensure resolved itemIds are not null
authorArtur Signell <artur.signell@itmill.com>
Wed, 7 Dec 2011 23:49:32 +0000 (23:49 +0000)
committerArtur Signell <artur.signell@itmill.com>
Wed, 7 Dec 2011 23:49:32 +0000 (23:49 +0000)
svn changeset:22308/svn branch:6.7

src/com/vaadin/data/util/AbstractBeanContainer.java

index b1d0b0672bb32dee2577a097a49f02c5432dfb4c..1b297d6a8886ba323587c52a77be9aeb5527440a 100644 (file)
@@ -637,6 +637,11 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
                 continue;
             }
             IDTYPE itemId = resolveBeanId(bean);
+            if (itemId == null) {
+                throw new IllegalArgumentException(
+                        "Resolved identifier for a bean must not be null");
+            }
+
             if (internalAddItemAtEnd(itemId, createBeanItem(bean), false) != null) {
                 modified = true;
             }