diff options
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractField.java')
-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; } |