diff options
author | Artur Signell <artur@vaadin.com> | 2013-11-15 18:40:57 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-12-03 13:27:31 +0000 |
commit | 25fc48c52067237faa208cea849a775a7aa1668c (patch) | |
tree | 39acbb1764fc64170fff033cdad9f51be18793e0 /server/src | |
parent | 54a5667b2cebf6df7825d92c287112f6be64fe7d (diff) | |
download | vaadin-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.java | 17 |
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; } |