diff --git a/spring-binding/src/main/java/org/springframework/binding/expression/el/BindingValueExpression.java b/spring-binding/src/main/java/org/springframework/binding/expression/el/BindingValueExpression.java index a8ed0f72..37db9067 100644 --- a/spring-binding/src/main/java/org/springframework/binding/expression/el/BindingValueExpression.java +++ b/spring-binding/src/main/java/org/springframework/binding/expression/el/BindingValueExpression.java @@ -90,11 +90,15 @@ class BindingValueExpression extends ValueExpression { } private Object convertValueIfNecessary(Object value, Class expectedType) { - try { - return conversionService.executeConversion(value, expectedType); - } catch (ConversionException e) { - throw new ELException("Unable to coerce value " + StylerUtils.style(value) + " to expected type [" - + expectedType + "]", e); + if (expectedType == null) { + return value; + } else { + try { + return conversionService.executeConversion(value, expectedType); + } catch (ConversionException e) { + throw new ELException("Unable to coerce value " + StylerUtils.style(value) + " to expected type [" + + expectedType + "]", e); + } } }