From 76a46585b4edd100ae2e8b67e9bb3e5464ee423e Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 21 Mar 2012 13:54:54 +0200 Subject: [PATCH] Fixed NPE when Table does not contain components --- src/com/vaadin/ui/Table.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 32d67939e3..5085f5b568 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -8,6 +8,7 @@ import java.io.Serializable; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -5282,6 +5283,11 @@ public class Table extends AbstractSelect implements Action.Container, } public Iterator getComponentIterator() { + if (visibleComponents == null) { + Collection empty = Collections.emptyList(); + return empty.iterator(); + } + return visibleComponents.iterator(); } -- 2.39.5