diff options
author | Henri Sara <hesara@vaadin.com> | 2011-11-08 11:24:12 +0200 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2011-11-08 11:24:12 +0200 |
commit | a61302616430cbbfc97cbdbb85fe294842b3409c (patch) | |
tree | dcca942cdad8fc09680effc7269819faea75a6e1 /src/com/vaadin/ui/AbstractField.java | |
parent | b2f5e652227dd4468622b092a8197afa8ee9b65f (diff) | |
download | vaadin-framework-a61302616430cbbfc97cbdbb85fe294842b3409c.tar.gz vaadin-framework-a61302616430cbbfc97cbdbb85fe294842b3409c.zip |
Eliminate more cases that used Property.toString().
Remaining possibly problematic cases include Label.compareTo(),
TestForPreconfiguredComponents and TestForTrees.
Diffstat (limited to 'src/com/vaadin/ui/AbstractField.java')
-rw-r--r-- | src/com/vaadin/ui/AbstractField.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java index 007f851a72..7b686fd397 100644 --- a/src/com/vaadin/ui/AbstractField.java +++ b/src/com/vaadin/ui/AbstractField.java @@ -299,7 +299,7 @@ public abstract class AbstractField extends AbstractComponent implements Field, // Discards buffer by overwriting from datasource newValue = dataSource.getValue(); - if (String.class == getType()) { + if (String.class == getType() && newValue != null) { newValue = newValue.toString(); } @@ -390,7 +390,7 @@ public abstract class AbstractField extends AbstractComponent implements Field, readThroughMode = readThrough; if (!isModified() && readThroughMode && dataSource != null) { Object newValue = dataSource.getValue(); - if (String.class == getType()) { + if (String.class == getType() && newValue != null) { newValue = newValue.toString(); } setInternalValue(newValue); @@ -468,7 +468,7 @@ public abstract class AbstractField extends AbstractComponent implements Field, } Object result = dataSource.getValue(); - if (String.class == getType()) { + if (String.class == getType() && result != null) { result = result.toString(); } return result; @@ -640,7 +640,7 @@ public abstract class AbstractField extends AbstractComponent implements Field, try { if (dataSource != null) { Object newValue = dataSource.getValue(); - if (String.class == getType()) { + if (String.class == getType() && newValue != null) { newValue = newValue.toString(); } setInternalValue(newValue); |