diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-10-21 20:41:05 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-10-29 10:42:48 +0200 |
commit | daaef63879df737a5840bbb7319ab595298cbbed (patch) | |
tree | 1de2c5abebfec78e74bcd136a2088352a4f9066b /server/src | |
parent | dfa0929e1b5d7cff137cc2b7c4bec5e8794cac30 (diff) | |
download | vaadin-framework-daaef63879df737a5840bbb7319ab595298cbbed.tar.gz vaadin-framework-daaef63879df737a5840bbb7319ab595298cbbed.zip |
FieldGroup should not throw NPE when data source is not set (#14901).
Change-Id: I74bea857306fac5123aa86cdabc70d81c2a72094
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/data/fieldgroup/FieldGroup.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java index 377acf3363..3a60b6912c 100644 --- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java @@ -209,7 +209,8 @@ public class FieldGroup implements Serializable { public void setReadOnly(boolean fieldsReadOnly) { readOnly = fieldsReadOnly; for (Field<?> field : getFields()) { - if (!field.getPropertyDataSource().isReadOnly()) { + if (field.getPropertyDataSource() == null + || !field.getPropertyDataSource().isReadOnly()) { field.setReadOnly(fieldsReadOnly); } else { field.setReadOnly(true); |