summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-11-15 18:40:57 +0200
committerVaadin Code Review <review@vaadin.com>2013-12-03 13:27:31 +0000
commit25fc48c52067237faa208cea849a775a7aa1668c (patch)
tree39acbb1764fc64170fff033cdad9f51be18793e0 /server/src
parent54a5667b2cebf6df7825d92c287112f6be64fe7d (diff)
downloadvaadin-framework-25fc48c52067237faa208cea849a775a7aa1668c.tar.gz
vaadin-framework-25fc48c52067237faa208cea849a775a7aa1668c.zip
Do not throw NPE if conversion messages is null (#12962)
Change-Id: Ie2b95ed4da89e2c5ab8b462300a6f4bd28dc7570
Diffstat (limited to 'server/src')
-rw-r--r--server/src/com/vaadin/ui/AbstractField.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java
index 6a52d6b849..b96e331889 100644
--- a/server/src/com/vaadin/ui/AbstractField.java
+++ b/server/src/com/vaadin/ui/AbstractField.java
@@ -783,15 +783,16 @@ public abstract class AbstractField<T> extends AbstractComponent implements
ConversionException e) {
String conversionError = getConversionError();
- if (dataSourceType != null) {
- conversionError = conversionError.replace("{0}",
- dataSourceType.getSimpleName());
- }
- if (e != null) {
- conversionError = conversionError.replace("{1}",
- e.getLocalizedMessage());
+ if (conversionError != null) {
+ if (dataSourceType != null) {
+ conversionError = conversionError.replace("{0}",
+ dataSourceType.getSimpleName());
+ }
+ if (e != null) {
+ conversionError = conversionError.replace("{1}",
+ e.getLocalizedMessage());
+ }
}
-
return conversionError;
}