diff options
author | Artur Signell <artur@vaadin.com> | 2012-03-21 13:54:54 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-03-21 15:28:13 +0200 |
commit | 76a46585b4edd100ae2e8b67e9bb3e5464ee423e (patch) | |
tree | fe7f42b374f1610ff7c9fec9ccf1cfcf7d46a86e | |
parent | 0ccbb6f705ce3d1247a0def3f27fa28b81264021 (diff) | |
download | vaadin-framework-76a46585b4edd100ae2e8b67e9bb3e5464ee423e.tar.gz vaadin-framework-76a46585b4edd100ae2e8b67e9bb3e5464ee423e.zip |
Fixed NPE when Table does not contain components
-rw-r--r-- | src/com/vaadin/ui/Table.java | 6 |
1 files changed, 6 insertions, 0 deletions
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<Component> getComponentIterator() { + if (visibleComponents == null) { + Collection<Component> empty = Collections.emptyList(); + return empty.iterator(); + } + return visibleComponents.iterator(); } |